Method and device for calculating electric quantity of battery and electronic equipment

By calculating the relationship between the battery's open-circuit voltage and actual available power at different times, the problem of misjudgment of battery power during load switching is solved, enabling accurate calculation of battery power and prevention of over-discharge.

CN120870907APending Publication Date: 2025-10-31FUZHOU ROCKCHIP SEMICON
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510964784.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-14
Publication Date
2025-10-31

AI Technical Summary

Technical Problem

In the prior art, the battery may shut down due to a voltage jump caused by load switching, which may lead to problems such as over-discharge or incomplete discharge of the battery.

Method used

The battery power is obtained by calculating the open-circuit voltage of the battery at different times, and the power calculation is adjusted in real time based on the relationship parameter value between the actual available power and the displayed power, eliminating the impact of voltage jumps on the coulomb meter and ensuring that the battery energy is fully released.

Benefits of technology

It enables accurate calculation of battery power when the load changes, prevents over-discharge of the battery, ensures that the battery energy is completely discharged, and avoids false shutdown caused by voltage jumps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120870907A_ABST
    Figure CN120870907A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for calculating the electric quantity of a battery and electronic equipment. The method comprises the following steps: calculating a first battery electric quantity of a battery at a first moment according to a preset time period signal, and calculating a second battery electric quantity of the battery during expected shutdown; calculating a real available electric quantity of the battery based on the first battery electric quantity and the second battery electric quantity, and calculating an electric quantity relation parameter value based on the real available electric quantity and a first residual display electric quantity of the battery at the first moment; according to a preset time period signal, the electric quantity variation of the battery during a preset duration from the first moment to the second moment is obtained, the residual display electric quantity variation is calculated based on the electric quantity variation and the electric quantity relation parameter value, and the preset duration is longer than a time period of the preset time period signal; and calculating a second remaining display electric quantity of the battery at the second time based on the remaining display electric quantity change amount and the first remaining display electric quantity. According to the invention, misjudgment shutdown and battery over-discharge of the system due to the jump characteristic of the voltage are prevented.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of battery power control technology, and more particularly to methods and apparatus for calculating battery power, and electronic equipment. Background Technology

[0002] Currently, battery-powered terminal devices generally use lithium batteries, and the screen displays the battery level. Battery level is primarily monitored using a fuel gauge chip, which operates on the coulomb counter principle. Lithium batteries have the following characteristics: their energy is mainly concentrated above 3.4V; below 3.4V, the energy is very low, making it difficult to ensure normal hardware operation. When the system suddenly switches to a high-load scenario, the battery voltage will immediately drop, and then rise again when the load decreases—a phenomenon known as the "voltage jump."

[0003] When the coulomb counter detects that the battery level has dropped to 0%, the battery voltage just reaches the agreed shutdown voltage (e.g., around 3.4V), and the system initiates shutdown. However, when the aforementioned "jump" occurs, the coulomb counter may not have detected 0% battery level (the system will not initiate shutdown), but the battery voltage may be close to or below 3.4V, which cannot meet the requirements for normal hardware operation. If the system does not shut down, it may lead to over-discharge of the battery.

[0004] Therefore, relying solely on coulomb counters will lead to the aforementioned battery over-discharge problem. Relying solely on voltage to determine whether to shut down may result in false shutdowns due to voltage fluctuations, causing premature shutdowns before the battery is fully discharged. Therefore, preventing false shutdowns due to voltage fluctuations and avoiding battery over-discharge are urgent problems to be solved. Summary of the Invention

[0005] This invention provides a method and apparatus for calculating battery power, and an electronic device that can prevent the system from mistakenly shutting down due to voltage "jump" characteristics and from over-discharging the battery.

[0006] In one aspect of the present invention, a method for calculating battery power is provided. The method includes: calculating a first open-circuit voltage of the battery at a first moment and obtaining a corresponding first battery power based on a preset time period signal; calculating a second open-circuit voltage of the battery at a planned power-off moment and obtaining a corresponding second battery power; calculating the actual usable power of the battery based on the first battery power and the second battery power; calculating a power relationship parameter value based on the actual usable power and a first remaining displayed power of the battery at the first moment; obtaining the change in battery power during a preset duration from the first moment to a second moment based on the preset time period signal; calculating the change in remaining displayed power based on the change in power and the power relationship parameter value, wherein the preset duration is shorter than the time period of the preset time period signal; and calculating a second remaining displayed power of the battery at the second moment based on the change in remaining displayed power and the first remaining displayed power.

[0007] In one aspect of the present invention, an apparatus for calculating battery power is provided. The apparatus includes: a calculation module configured to: calculate a first open-circuit voltage of the battery at a first moment and obtain a corresponding first battery power based on a preset time period signal; calculate a second open-circuit voltage of the battery at a predetermined power-off moment and obtain a corresponding second battery power; calculate the actual available power of the battery based on the first battery power and the second battery power; and calculate a power relationship parameter value based on the actual available power and a first remaining displayed power of the battery at the first moment; obtain, according to the preset time period signal, a change in battery power during a preset duration from the first moment to a second moment; and calculate a change in remaining displayed power based on the change in power and the power relationship parameter value, wherein the preset duration is shorter than the time period of the preset time period signal; and calculate a second remaining displayed power of the battery at the second moment based on the change in remaining displayed power and the first remaining displayed power.

[0008] In another aspect of the invention, an electronic device is provided. The electronic device includes: a memory configured to store an executable program; and a processor configured to execute the executable program to perform the above-described method for calculating battery power.

[0009] According to the technical solution of the present invention, during system operation, the first open-circuit voltage of the battery at a first moment is calculated and the corresponding first battery charge is obtained based on a preset time period signal, and the second open-circuit voltage of the battery at the expected shutdown moment is calculated and the corresponding second battery charge is obtained; the actual available battery charge is calculated based on the first battery charge and the second battery charge, and the charge relationship parameter value is calculated based on the actual available charge and the first remaining displayed charge of the battery at the first moment. The charge relationship parameter value reflects the degree of difference between the actual battery charge and the displayed charge under the current load scenario or current power supply demand. Then, the change in the remaining displayed charge of the battery within a preset time period is calculated by using the charge change and the charge relationship parameter value. Then, the second remaining displayed charge of the battery after a preset time period is calculated based on the change in the remaining displayed charge and the first remaining displayed charge. This replaces the conventional method of using a coulomb counter to calculate and update the charge, eliminates the defect that the coulomb counter cannot keep up with the voltage change when the system voltage "jumps", and allows the battery energy to be released as much as possible. The battery output can be stopped in time based on the size of the second remaining displayed charge, effectively preventing the battery from being over-discharged. Attached Figure Description

[0010] Figure 1 This is a flowchart illustrating a method for calculating battery capacity according to an embodiment of the present disclosure; Figure 2 This is a flowchart illustrating a method for calculating battery capacity according to an embodiment of the present invention; Figure 3 This is a schematic diagram illustrating the numerical conversion relationship between the open-circuit voltage and the state of charge of a battery according to an embodiment of the present invention; Figure 4 This is a schematic diagram illustrating a power calculation electronic device for preventing battery over-discharge according to an embodiment of the present invention. Detailed Implementation

[0011] To explain in detail the technical content, objectives, and effects of the present invention, the following description is provided in conjunction with the embodiments and accompanying drawings.

[0012] In existing technologies, batteries typically use coulomb counters to measure charge levels. When the system switches to a high-load scenario, causing a "jump" in battery charge, the coulomb counter may not show a charge level of 0% (the system will not initiate a shutdown), but the battery voltage may be close to or below 3.4V, which is insufficient for normal hardware operation. If the system does not shut down, the battery may be over-discharged. Furthermore, if the shutdown decision is based entirely on voltage, the "jump" nature of the voltage may lead to a false shutdown, resulting in premature shutdown before the battery is fully discharged.

[0013] In product applications, relying solely on coulomb counters can lead to the aforementioned battery over-discharge issues. Furthermore, relying entirely on voltage to determine whether to shut down may result in false shutdowns due to voltage fluctuations, causing premature shutdowns before the battery is fully discharged. Coulomb counters cannot accurately reflect voltage changes because they integrate time and current, not directly sensing voltage variations. Coulomb counters provide better power measurement results only under stable current conditions.

[0014] To address at least the aforementioned technical problems, this disclosure provides a method for calculating battery power. According to this disclosure, when the battery outputs voltage, based on a preset time period signal, a first open-circuit voltage of the battery at a first moment is calculated and the corresponding first battery power is obtained; and a second open-circuit voltage of the battery at the expected shutdown moment is calculated and the corresponding second battery power is obtained. The actual usable battery power is calculated based on the first and second battery power, and a power relationship parameter value is calculated based on the actual usable power and the first remaining displayed battery power at the first moment. The change in displayed battery power within a preset time period is calculated using the power change and the power relationship parameter value. Then, based on the change in displayed battery power and the first remaining displayed battery power, a second remaining displayed battery power after a preset time period is calculated. This process is repeatedly executed using the preset time period signal to monitor the real-time status of battery power changes.

[0015] In this manner, embodiments of the present disclosure can utilize power relationship parameter values ​​to reflect the degree of difference between the actual battery power and the displayed power power under the current load scenario or current power supply demand. Then, the remaining displayed power power change within a preset time period is calculated using the power power change and the power relationship parameter values. Based on the remaining displayed power power change and the first remaining displayed power power, the second remaining displayed power power after the preset time period is calculated, replacing the conventional method of using a coulomb counter to calculate and update the power. This eliminates the defect that the coulomb counter cannot keep up with the voltage change when the system voltage "jumps," allowing the battery energy to be released as much as possible. By relying on the size of the second remaining displayed power power, the battery output can be stopped in time, effectively preventing the battery from being over-discharged.

[0016] In some embodiments, when the battery voltage is above approximately 3.8V, energy is concentrated, and there is no need to worry about over-discharge; the remaining charge can be updated using coulomb calculation. When the battery voltage is below 3.8V, a scheme combining voltage and coulomb counting is adopted.

[0017] In some embodiments, the battery open-circuit voltage Vocv1 = V1 + I*R is estimated based on the current real-time voltage, battery internal resistance, and discharge current. Then, the battery charge Soc1 corresponding to Vocv1 is obtained according to the ocv-soc table relationship. The battery open-circuit voltage Vocv2 = V2 + I*R is estimated based on the expected shutdown voltage, battery internal resistance, and discharge current in the software. Then, the battery charge Soc2 corresponding to Vocv2 is obtained according to the ocv-soc table relationship. Next, the physically available battery charge is obtained: Soc3 = Soc1 - Soc2. Then, a linear relationship is established between the current displayed charge Soc4 (i.e., the remaining displayed charge) and the physically available battery charge Soc3: K = Soc4 / Soc3. Subsequently, the formula for calculating the change in charge is further determined: deltaY = K * deltaX. deltaX is the coulombic change from T0 to T1 per unit time (e.g., after 5 seconds), and deltaY is the change in displayed charge. Therefore, the new displayed battery level at time T1 can be obtained as follows: Soc5 (the new displayed battery level at time T1) = Soc4 (the displayed battery level at time T0) – deltaY. By setting the software to repeat the above process at a set time period (e.g., every 10 seconds), the K value corresponding to the current load scenario can be obtained, thus providing an accurate picture of the battery level change.

[0018] According to embodiments of this disclosure, the battery product's power display characteristics include: a smooth discharge curve, meaning that under the same load scenario, the discharge speed does not fluctuate. The power decreases rapidly under heavy load and slowly under light load. This involves a lengthy process requiring the fuel gauge to continuously adjust the power level based on the current situation. Furthermore, the calculated power level does not jump. Additionally, the product's battery life is maximized, meaning that when the battery is turned off at 0%, the battery should be discharged as quickly as possible.

[0019] Many power calculation methods may focus on a smooth discharge curve, but this can easily lead to over-discharge of the battery, or they may focus on preventing over-discharge, but the curve may not be smooth. The technical solution according to the embodiments of this disclosure can ensure that the discharge curve is as smooth as possible while preventing the battery from being over-discharged, thus achieving both goals.

[0020] In some embodiments, the K value reflects the degree of load change per unit time and provides a quantified value deltaY. A high load causes the displayed battery level to drop rapidly, while a low load slows the drop, resulting in a reasonable and smooth discharge curve. Furthermore, because the K value is derived from the actual battery level and the expected shutdown voltage, the Soc5 obtained through the aforementioned iterative process is reliable. Finally, when it equals 0%, shutdown is initiated, at which point the voltage is close to the expected shutdown point. Therefore, the K value correlates shutdown voltage, real-time voltage, short-term load changes, discharge rate (curve), and displayed battery level, continuously cycling and progressively changing together.

[0021] In this way, the technical solution according to the embodiments of this disclosure can ensure the smoothness of the discharge curve so as to adapt to the load, ensure that the battery is not over-discharged so as to prevent over-discharge of the battery, and allow the battery to discharge as much energy as possible while ensuring that it is not over-discharged.

[0022] In the following, the technical solutions according to this disclosure will be described with reference to specific embodiments and in conjunction with the accompanying drawings.

[0023] Figure 1 This is a flowchart illustrating a method 100 for calculating battery power according to an embodiment of the present disclosure. (Refer to...) Figure 1 The method 100 includes the following steps 102 to 108.

[0024] In step 102, based on the preset time period signal, the first open-circuit voltage of the battery at the first moment is calculated and the corresponding first battery charge is obtained. Similarly, the second open-circuit voltage of the battery at the expected shutdown moment is calculated and the corresponding second battery charge is obtained. In this way, the actual battery charge at the first moment is accurately determined. Combined with the battery charge at the expected shutdown moment, the actual usable battery charge can be accurately calculated subsequently, providing a reliable data foundation for investigating the degree of load change within the current unit of time.

[0025] In some embodiments, it is determined whether the real-time voltage of the battery is less than or equal to a preset warning voltage. If so, a preset time period signal is generated; otherwise, the current remaining battery power is obtained using a coulomb counter. In this way, when the real-time battery voltage is higher than the preset warning voltage, there is no risk of over-discharge, so only the coulomb counter needs to be used to update the battery power, reducing the data processing burden. Once the real-time voltage is less than or equal to the preset warning voltage, a time-period-based repeated power calculation process is employed, making the overall power calculation method more reasonable and convenient.

[0026] In some embodiments, in response to the effective edge of a preset time period signal, the real-time voltage and real-time discharge current of the battery are acquired at a first moment. A first open-circuit voltage is calculated based on the real-time voltage, the battery's internal resistance, and the discharge current. A first battery charge corresponding to the first open-circuit voltage is obtained based on the correspondence between the battery's open-circuit voltage and its charge level. In this way, by combining hardware parameters such as the battery's internal resistance and real-time data such as the real-time discharge current, the first open-circuit voltage of the battery at the current moment can be accurately calculated; furthermore, by utilizing the correspondence between the open-circuit voltage and the charge level inherent in each type of battery during manufacturing, the first battery charge can be accurately obtained after calculating the first open-circuit voltage.

[0027] In some embodiments, the real-time discharge current of the battery is acquired in response to the effective edge of a preset time period signal. A second open-circuit voltage is calculated based on the preset shutdown voltage of the battery at the expected shutdown time, the battery's internal resistance, and the discharge current. A second battery capacity corresponding to the second open-circuit voltage is obtained based on the correspondence between the battery's open-circuit voltage and its capacity. In this way, by combining hardware parameters such as the battery's internal resistance and real-time data such as the real-time discharge current, the second open-circuit voltage of the battery at its current state can be accurately calculated; furthermore, by utilizing the correspondence between the open-circuit voltage and battery capacity inherent in each type of battery during manufacturing, the second battery capacity can be accurately obtained after calculating the second open-circuit voltage.

[0028] In step 104, the actual available battery capacity is calculated based on the first battery capacity and the second battery capacity, and the battery capacity relationship parameter value is calculated based on the actual available capacity and the first remaining displayed battery capacity at the first moment. This method, using the actual available capacity and the first remaining displayed battery capacity to calculate the battery capacity relationship parameter value, can effectively and promptly respond to load changes, resulting in a smoother and more reasonable battery discharge curve, providing a reliable data foundation for subsequent battery capacity calculations.

[0029] In some embodiments, the relative change relationship between the first remaining displayed battery power and the actual available battery power is calculated, and a battery power relationship parameter value is obtained based on the relative change relationship. In some embodiments, the battery power change is adjusted based on the battery power relationship parameter value representing the relative change relationship to obtain the change in the remaining displayed battery power. In this way, the relative change relationship between the real-time displayed battery power and the actual available battery power can be obtained, which can respond to load changes in a timely and effective manner, making the obtained battery power relationship parameter value more reliable.

[0030] In some embodiments, the actual usable battery capacity is obtained based on the difference between the capacity of the first battery and the capacity of the second battery. In this way, by subtracting the values, the remaining battery capacity from its initial state to the expected shutdown time is calculated. By monitoring changes in the actual usable battery capacity, over-discharge of the battery can also be prevented.

[0031] In some embodiments, in each cycle corresponding to a preset time period signal, a power relationship parameter value is obtained based on the ratio between the first remaining displayed power and the actual available power. This power relationship parameter value corresponds to the degree of load change per unit time in the current cycle or the rate of decrease of the remaining displayed power in the current cycle. In this way, by obtaining the power relationship parameter value through the ratio between the first remaining displayed power and the actual available power, a linear relationship can be used to intuitively reflect the degree of load change per unit time in the current cycle or the rate of decrease of the remaining displayed power in the current cycle.

[0032] In step 106, based on the preset time period signal, the change in battery power during the preset duration from the first moment to the second moment is obtained, and the change in remaining displayed battery power is calculated based on the change in battery power and the battery power relationship parameter value. The preset duration is shorter than the time period of the preset time period signal.

[0033] In one embodiment, in response to the effective edge of a preset time period signal, the change in battery power over a preset duration is acquired via a coulomb counter from a first moment to a second moment. In this way, using the effective edge of the preset time period signal as a trigger signal, the change in battery power over the preset duration can be repeatedly acquired and continuously converted into the remaining displayed battery power change, thus enabling timely monitoring of the battery's displayed power level.

[0034] In step 108, the second remaining displayed battery level is calculated based on the change in remaining displayed battery level and the first remaining displayed battery level. In this way, the second remaining displayed battery level represents the battery level displayed after a preset time period. Compared to the value obtained by sampling from a coulomb counter, this method fully considers the impact of load variations and is more accurate.

[0035] In some embodiments, in each period corresponding to a preset time period signal, the second remaining displayed battery level is obtained based on the difference between the first remaining displayed battery level and the change in remaining displayed battery level. In this way, the change in remaining displayed battery level is the change in displayed battery level within a preset time period. Therefore, knowing the first remaining displayed battery level at the first moment, the second remaining displayed battery level at the second moment can be directly obtained through subtraction.

[0036] In some embodiments, if the second remaining battery level is 0 after at least one cycle corresponding to a preset time period signal, the battery is turned off. In this way, the battery is shut down at the moment when the second remaining battery level actually reaches 0%, i.e., when the voltage is just approaching the expected shutdown point, thus allowing the battery to discharge as much energy as possible without over-discharging.

[0037] The following description will use examples to illustrate the application scenarios of the method for calculating battery power, the electronic device, and the storage medium according to embodiments of the present invention.

[0038] Power consumption statistics for devices powered by lithium batteries primarily rely on fuel gauge chips, which operate on the coulomb counter principle. Lithium batteries exhibit several characteristics: their energy is mainly concentrated above 3.4V; below 3.4V, the energy is minimal, making it difficult to ensure normal hardware operation. When the system suddenly switches to a high-load scenario, the battery voltage is immediately pulled down, and then rises again when the load decreases—a phenomenon known as the "voltage jump."

[0039] When the coulomb counter detects that the battery has discharged to 0%, the battery voltage just reaches the agreed shutdown voltage (e.g., around 3.4V), and the system initiates shutdown. However, when the aforementioned "jump" phenomenon occurs, the coulomb counter may not have detected 0% of the battery (the system will not initiate shutdown), but the battery voltage may be close to or below 3.4V, failing to meet the requirements for normal hardware operation. If the system does not shut down, it may lead to over-discharge of the battery. Relying entirely on the coulomb counter will result in the aforementioned over-discharge problem. Relying entirely on voltage to determine whether to shut down may lead to misjudgment due to the "jump" characteristic of voltage, resulting in premature shutdown before the battery is fully discharged.

[0040] Figure 2 This is a flowchart illustrating a method 300 for calculating battery capacity according to an embodiment of the present invention. Figure 2 As shown, the method includes steps 302 to 312.

[0041] In step 302, it is determined whether the real-time battery voltage is less than or equal to the preset warning voltage. If so, a preset time period signal is generated; otherwise, the current remaining battery power is obtained using a coulomb counter. The preset shutdown voltage of a typical battery is 3.4V, so the preset warning voltage can be set to 3.8V. When the real-time battery voltage is higher than 3.8V, it indicates no risk of over-discharge, and the displayed battery power can be updated using a coulomb counter. Conversely, when the real-time battery voltage is lower than or equal to 3.8V, it indicates a growing risk of over-discharge, and a time period is generated. Within each time period, the following steps are used to calculate the battery power.

[0042] In step 304, based on the preset time period signal, the first open-circuit voltage of the battery at the first moment is calculated and the corresponding first battery charge is obtained, and the second open-circuit voltage of the battery at the expected shutdown time is calculated and the corresponding second battery charge is obtained.

[0043] Figure 3 This is a schematic diagram illustrating the correspondence between the open-circuit voltage and the state of charge of a battery according to an embodiment of the present invention. (In conjunction with...) Figure 3Based on the first open-circuit voltage and the second open-circuit voltage, the first battery charge and the second battery charge are obtained from the corresponding relationship, as follows.

[0044] Obtain the battery's internal resistance R and real-time discharge current I. Based on the battery's real-time voltage V1, internal resistance R, and discharge current I, calculate the first open-circuit voltage Vocv1, as shown in the following expression: Vocv1 = V1 + I × R.

[0045] Based on the preset shutdown voltage V2, battery internal resistance R, and discharge current I, the second open-circuit voltage Vocv2 is calculated, and its expression is as follows: Vocv2 = V2 + I × R.

[0046] Combination Figure 3 The first battery charge Soc1 is obtained by converting the first open-circuit voltage Voco1, and the second battery charge Soc2 is obtained by converting the second open-circuit voltage Vocv2.

[0047] In step 306, the actual available battery capacity Soc3 is calculated based on the first battery capacity Soc1 and the second battery capacity Soc2, and the battery capacity relationship parameter value K is calculated based on the actual available battery capacity Soc3 and the first remaining displayed battery capacity Soc4 at the first moment.

[0048] In this embodiment, the expression for the actual available power Soc3 is as follows: Soc3 = Soc1 - Soc2.

[0049] This paper analyzes the relative changes between the first remaining displayed battery capacity, Soc4, and the actual usable battery capacity, Soc3. The first remaining displayed battery capacity, Soc4, is the real-time displayed capacity obtained by using a coulomb counter at the first moment. The ratio of the first remaining displayed battery capacity, Soc4, to the actual usable battery capacity, Soc3, is calculated, and the resulting ratio is used as the battery capacity relationship parameter value K. The expression for K is as follows: K = Soc4 / Soc3.

[0050] As can be seen, there is a linear relationship between the first remaining displayed battery capacity (Soc4) and the actual usable battery capacity (Soc3). The value of K reflects the rate at which the first remaining displayed battery capacity (Soc4) decreases within this cycle. The larger the K value, the faster the first remaining displayed battery capacity (Soc4) decreases (to quickly approach the shutdown voltage point and prevent over-discharge), and vice versa (to release more battery energy). Typically, a voltage "jump" caused by a high load in a short period of time will increase the K value, and the first remaining displayed battery capacity (Soc4) will decrease faster. If this high load is continuous, K will also remain a relatively large value, and the first remaining displayed battery capacity (Soc4) will continue to decrease rapidly.

[0051] In step 308, based on a preset time period signal, the battery charge change deltaX is obtained during a preset duration from the first moment to the second moment. The remaining displayed battery charge change deltaY is calculated based on the charge change deltaX and the charge relationship parameter value K. The preset duration is shorter than the time period of the preset time period signal. In this embodiment, the preset time period signal can be selected as 10 seconds, and the preset duration can be selected as 5 seconds.

[0052] In this embodiment, firstly, the change in battery charge deltaX within a preset time period is calculated using a coulomb counter. Then, the change in remaining displayed battery charge deltaY is obtained based on the charge relationship parameter value K, and its expression is as follows: deltaY = K × deltaX.

[0053] In step 310, the second remaining displayed battery capacity Soc5 is calculated based on the remaining displayed battery capacity change deltaY and the first remaining displayed battery capacity Soc4 at the second time point.

[0054] Specifically, the second remaining display battery level, Soc5, is obtained by subtracting the change in remaining display battery level, deltaY, from the first remaining display battery level, Soc4. The expression for this is as follows: Soc5 = Soc4 - deltaY.

[0055] In step S312, if the second remaining battery level Soc5 is 0%, the battery is turned off after a preset time. A 0% remaining battery level Soc5 indicates that the battery voltage is approaching the preset shutdown voltage under the current load scenario, thus the battery is promptly shut down to prevent over-discharge. If the second remaining battery level Soc5 is not 0%, it indicates that the battery has not fully released its energy, and the system waits for the valid edge of the next preset time period signal.

[0056] In another aspect of the invention, an apparatus for calculating battery power is provided, the apparatus including a calculation module.

[0057] The calculation module is configured to calculate the first open-circuit voltage of the battery at a first moment and obtain the corresponding first battery charge based on a preset time period signal, and to calculate the second open-circuit voltage of the battery at the expected power-off moment and obtain the corresponding second battery charge. The calculation module is configured to calculate the actual available battery charge based on the first and second battery charges, and to calculate a charge relationship parameter value based on the actual available charge and the first remaining displayed charge at the first moment. The calculation module is configured to obtain the change in battery charge over a preset duration from the first moment to the second moment based on the preset time period signal, and to calculate the change in remaining displayed charge based on the change in charge and the charge relationship parameter value, where the preset duration is shorter than the time period of the preset time period signal. Furthermore, the calculation module is configured to calculate the second remaining displayed charge at the second moment based on the change in remaining displayed charge and the first remaining displayed charge.

[0058] It should be understood that the computing module can be configured to perform the corresponding steps or actions in the methods described in the above embodiments, which will not be repeated here.

[0059] In some embodiments, the device may further include a measurement module and a coulomb meter. The measurement module is configured to sense the real-time voltage and real-time discharge current of the battery. The coulomb meter is configured to sense the change in the battery's charge level.

[0060] According to another aspect of the invention, Figure 4 This is a schematic diagram illustrating an electronic device 500 for calculating battery power according to an embodiment of the present invention. (Refer to...) Figure 4 The electronic device 500 includes a memory 502, a processor 504, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the various steps of the method for calculating battery power as described above.

[0061] In summary, the method, electronic device, and storage medium for calculating battery power provided by this invention calculate the battery's open-circuit voltage in the current state and before the preset shutdown state during system operation. It calculates the battery's actual usable power by combining the relative conversion relationship between the battery's open-circuit voltage and its power capacity. Then, by reflecting the relative change between the battery's real-time displayed power capacity and the actual usable power capacity, it indicates the degree of difference between the actual battery power capacity and the displayed power capacity under the current load scenario or power supply demand. Furthermore, it accurately assesses the expected displayed power capacity of the battery after a preset time in the current scenario using the relative change relationship. This replaces the conventional method of using a coulomb counter to calculate and update the power capacity, eliminating the defect that the coulomb counter cannot keep up with voltage changes when the system voltage "jumps," allowing the battery energy to be released as much as possible. When the displayed power capacity is close to the shutdown voltage, the battery output stops, effectively preventing over-discharge of the battery.

[0062] The above description is merely an embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent modifications made based on the content of the present invention specification and drawings, or direct or indirect applications in related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for calculating battery capacity, characterized in that, include: Based on a preset time period signal, calculate the first open-circuit voltage of the battery at the first moment and obtain the corresponding first battery charge; and calculate the second open-circuit voltage of the battery when it is expected to be powered off and obtain the corresponding second battery charge. The actual usable power of the battery is calculated based on the first battery power and the second battery power, and the power relationship parameter value is calculated based on the actual usable power and the first remaining displayed power of the battery at the first moment. According to the preset time period signal, the change in battery power during a preset duration from the first moment to the second moment is obtained, and the change in remaining displayed battery power is calculated based on the change in battery power and the battery power relationship parameter value. The preset duration is shorter than the time period of the preset time period signal. as well as The second remaining displayed battery level at the second time is calculated based on the change in remaining displayed battery level and the first remaining displayed battery level.

2. The method according to claim 1, characterized in that, Calculating the first open-circuit voltage of the battery at the first moment and obtaining the corresponding first battery charge includes: In response to the effective edge of the preset time period signal, the real-time voltage and real-time discharge current of the battery are acquired at the first moment. Calculate the first open-circuit voltage based on the real-time voltage, the battery's internal resistance, and the discharge current; and Based on the correspondence between the open-circuit voltage and the battery capacity, the first battery capacity corresponding to the first open-circuit voltage is obtained.

3. The method according to claim 1, characterized in that, Calculating the second open-circuit voltage of the battery at the expected shutdown time and obtaining the corresponding second battery charge includes: The real-time discharge current of the battery is obtained in response to the effective edge of the preset time period signal; The second open-circuit voltage is calculated based on the preset shutdown voltage of the battery at the expected shutdown time, the battery's internal resistance, and the discharge current; and Based on the correspondence between the open-circuit voltage and the battery capacity, the second battery capacity corresponding to the second open-circuit voltage is obtained.

4. The method according to claim 1, characterized in that, Calculating the actual usable capacity of the battery based on the first battery capacity and the second battery capacity includes: The actual usable power is obtained based on the difference between the power of the first battery and the power of the second battery.

5. The method according to claim 1, characterized in that, The calculation of the power relationship parameter value based on the actual available power and the battery's first remaining displayed power at the first moment includes: In each cycle corresponding to the preset time cycle signal, the power relationship parameter value is obtained based on the ratio between the first remaining displayed power and the actual available power. The power relationship parameter value corresponds to the degree of load change per unit time in the current cycle or the rate of decrease of the remaining displayed power in the current cycle.

6. The method according to claim 1, characterized in that, Obtaining the change in battery charge during a preset time period from the first time point to the second time point includes: In response to the effective edge of the preset time period signal, from the first moment to the second moment, the change in the amount of electricity during the preset duration is obtained by a coulomb counter.

7. The method according to claim 1, characterized in that, Calculating the remaining displayed battery level change based on the battery level change and the battery level relationship parameter value includes: The remaining displayed battery level change is obtained by multiplying the battery level relationship parameter value by the battery level change.

8. The method according to claim 1, characterized in that, Calculating the second remaining displayed battery level at the second time based on the change in remaining displayed battery level and the first remaining displayed battery level includes: In each period corresponding to the preset time period signal, the second remaining display battery level is obtained based on the difference between the first remaining display battery level and the change in the remaining display battery level.

9. The method according to claim 1, characterized in that, Also includes: After at least one cycle corresponding to the preset time period signal, if the second remaining displayed battery level is 0, the battery is turned off.

10. The method according to claim 1, characterized in that, Also includes: Determine whether the real-time voltage of the battery is less than or equal to the preset warning voltage; as well as If so, then the preset time period signal is activated.

11. The method according to claim 10, characterized in that, Also includes: If the real-time voltage of the battery is greater than the preset warning voltage, the current remaining display power of the battery is obtained by a coulomb counter.

12. The method according to claim 1, characterized in that, The calculation of the power relationship parameter value based on the actual available power and the battery's first remaining displayed power at the first moment includes: Calculate the relative change between the first remaining displayed battery power and the actual available battery power; and The electrical quantity relationship parameter value is obtained based on the relative change relationship.

13. The method according to claim 12, characterized in that, Calculating the remaining displayed battery level change based on the battery level change and the battery level relationship parameter value includes: The remaining displayed battery level change is obtained by adjusting the battery level change based on the battery level relationship parameter value that represents the relative change relationship.

14. A device for calculating battery charge, characterized in that, include: The calculation module is configured as follows: Based on a preset time period signal, calculate the first open-circuit voltage of the battery at the first moment and obtain the corresponding first battery charge, and calculate the second open-circuit voltage of the battery at the expected shutdown time and obtain the corresponding second battery charge; The actual usable power of the battery is calculated based on the first battery power and the second battery power, and the power relationship parameter value is calculated based on the actual usable power and the first remaining displayed power of the battery at the first moment. According to the preset time period signal, the change in battery power during a preset duration from the first moment to the second moment is obtained, and the change in remaining displayed battery power is calculated based on the change in battery power and the battery power relationship parameter value. The preset duration is shorter than the time period of the preset time period signal. as well as The second remaining displayed battery level at the second time is calculated based on the change in remaining displayed battery level and the first remaining displayed battery level.

15. The apparatus according to claim 14, characterized in that, Also includes: The measurement module is configured to sense the real-time voltage and real-time discharge current of the battery; as well as A coulomb counter is configured to sense changes in the battery's charge level.

16. An electronic device comprising: The memory is configured to store executable programs; as well as The processor is configured to execute the executable program to perform the method according to any one of claims 1 to 13.