Battery power estimation method and device of equipment, equipment and storage medium
Patent Information
- Application Number
- CN202111574092.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-21
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2041-12-21
AI Technical Summary
该方案需要对电流的实时采样值做积分,计算量大,消耗内存资源,对硬件的要求较高,而且要求设备必须处于正常工作状态,无法对处于睡眠状态的设备进行电池电量的预估
[0022]本发明实施例提供的一种设备的电池电量预估方案,获取设备的电池当前的电压值和温度值。若电池处于充电状态,则根据电压值和预先获取的电压偏移曲线确定电池的电压偏移量,并根据温度值从预先获取的多条充放电温度曲线中选择目标温度曲线,进而根据电压偏移量和目标温度曲线计算电池的当前的电量值。若电池处于放电状态,则根据温度值从预先获取的多条充放电温度曲线中选择目标温度曲线,根据目标温度曲线计算电池的当前的电量值。
Smart Images

Figure CN116298985B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of Internet technology, and in particular to a method, apparatus, electronic device, and computer-readable storage medium for estimating the battery power of a device. Background Technology
[0002] As many smart hardware devices in the Internet of Things (IoT) field become increasingly popular, the battery, as the energy source for these devices, has made battery power estimation a crucial evaluation criterion for ensuring their proper functioning. The accuracy of battery power estimation directly impacts user experience and battery efficiency.
[0003] In battery power estimation solutions, one approach relies on peripheral circuitry of a power metering chip to predict the device's battery capacity. However, this peripheral circuitry, centered around the power metering chip, increases the complexity of the device's circuit design and raises hardware costs. Another approach uses dual-channel sampling of voltage and current, employing an ampere-hour integration method to obtain the battery's capacity during charging and discharging. This approach requires integrating real-time current samples, resulting in high computational demands, memory consumption, and stringent hardware requirements. Furthermore, it requires the device to be in normal operating condition and cannot estimate battery power for devices in sleep mode. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a battery power estimation method, apparatus, electronic device, and computer-readable storage medium for a device that overcomes or at least partially solves the above problems.
[0005] To address the aforementioned problems, according to a first aspect of the present invention, a method for estimating the battery capacity of a device is disclosed, comprising: acquiring the current voltage and temperature values of the device's battery; if the battery is in a charging state, determining the voltage offset of the battery based on the voltage value and a pre-acquired voltage offset curve, and selecting a target temperature curve from a plurality of pre-acquired charge-discharge temperature curves based on the temperature value; calculating the current battery capacity based on the voltage offset and the target temperature curve; if the battery is in a discharging state, selecting the target temperature curve from a plurality of pre-acquired charge-discharge temperature curves based on the temperature value, and calculating the current battery capacity based on the target temperature curve.
[0006] Optionally, the step of obtaining the voltage offset curve includes: sampling the voltage value of the battery before charging and the voltage value after charging at different stages when the battery is in a charging state, to obtain the voltage difference between the battery before charging and after charging; fitting the voltage offset curve based on the voltage difference at different stages and the corresponding charging voltage; wherein the voltage offset curve represents the correspondence between the voltage difference and the charging voltage.
[0007] Optionally, the method further includes: when the charging port of the device detects a charger connection action, dynamically calculating the instantaneous voltage offset of the battery and obtaining the instantaneous charging voltage of the battery; determining whether the instantaneous voltage offset is valid based on the instantaneous charging voltage and the voltage offset curve; if the instantaneous voltage offset is valid, refreshing the battery's power value.
[0008] Optionally, determining whether the instantaneous voltage offset is valid based on the instantaneous charging voltage and the voltage offset curve includes: searching for a target voltage offset corresponding to the instantaneous charging voltage in the voltage offset curve; comparing the instantaneous voltage offset with the target voltage offset; if the offset difference between the instantaneous voltage offset and the target voltage offset is within a preset offset range, then the instantaneous voltage offset is considered valid; if the offset difference is outside the offset range, then the instantaneous voltage offset is considered invalid.
[0009] Optionally, the method further includes: when the charging port of the device detects that the charger has disconnected, clearing the voltage offset, and performing the operation step of selecting the target temperature curve from a plurality of pre-acquired charge and discharge temperature curves according to the temperature value if the battery is in a discharging state, and calculating the current charge value of the battery according to the target temperature curve.
[0010] Optionally, after obtaining the current voltage value of the device's battery, the method further includes: determining whether the voltage fluctuation value of the battery within a preset first time period exceeds a preset fluctuation range based on the voltage value; if the voltage fluctuation value exceeds the fluctuation range, then obtaining the voltage value again after the battery voltage stabilizes.
[0011] Optionally, after obtaining the current temperature value of the device's battery, the method further includes: determining whether the temperature difference of the battery within a preset second time period exceeds a preset temperature difference range based on the temperature value; if the temperature difference exceeds the temperature difference range, adjusting the operating voltage of the device according to the LDO control logic unit, and adjusting the working mode of the device's external devices.
[0012] According to a second aspect of the present invention, a battery power estimation device for a device is also disclosed. The device includes: an acquisition module for acquiring the current voltage and temperature values of the device's battery; a voltage offset determination module for determining the voltage offset of the battery based on the voltage value and a pre-acquired voltage offset curve if the battery is in a charging state; a temperature curve determination module for selecting a target temperature curve from a plurality of pre-acquired charge / discharge temperature curves based on the temperature value if the battery is in a charging state; a power value calculation module for calculating the current power value of the battery based on the voltage offset and the target temperature curve if the battery is in a charging state; the temperature curve determination module is further configured to select the target temperature curve from a plurality of pre-acquired charge / discharge temperature curves based on the temperature value if the battery is in a discharging state; and the power value calculation module is further configured to calculate the current power value of the battery based on the target temperature curve if the battery is in a discharging state.
[0013] Optionally, the device further includes: a voltage offset curve acquisition module, used to acquire the voltage offset curve; the voltage offset curve acquisition module includes: a voltage sampling module, used to sample the voltage value of the battery before charging and the voltage value after charging at different stages when the battery is in a charging state, respectively, to obtain the voltage difference of the battery before charging and after charging; a curve fitting module, used to fit the voltage offset curve according to the voltage difference at different stages and the corresponding charging voltage; wherein, the voltage offset curve represents the correspondence between the voltage difference and the charging voltage.
[0014] Optionally, the device further includes: an instantaneous voltage acquisition module, configured to dynamically calculate the instantaneous voltage offset of the battery and acquire the instantaneous charging voltage of the battery when the charging port of the device detects a charger connection action; a voltage validity determination module, configured to determine whether the instantaneous voltage offset is valid based on the instantaneous charging voltage and the voltage offset curve; and a power refresh module, configured to refresh the power value of the battery if the instantaneous voltage offset is valid.
[0015] Optionally, the voltage validity determination module includes: an offset search module, used to search for a target voltage offset corresponding to the instantaneous charging voltage in the voltage offset curve; an offset comparison module, used to compare the instantaneous voltage offset and the target voltage offset; a validity confirmation module, used to consider the instantaneous voltage offset valid if the offset difference between the instantaneous voltage offset and the target voltage offset is within a preset offset range; and an invalidity confirmation module, used to consider the instantaneous voltage offset invalid if the offset difference is outside the offset range.
[0016] Optionally, the device further includes an offset clearing module, used to clear the voltage offset when the charging port of the device detects a charger disconnection action.
[0017] Optionally, the device further includes: a voltage fluctuation judgment module, configured to, after the acquisition module acquires the current voltage value of the device's battery, determine whether the voltage fluctuation value of the battery within a preset first time period exceeds a preset fluctuation range based on the voltage value; the acquisition module is further configured to, if the voltage fluctuation value exceeds the fluctuation range, reacquire the voltage value after the battery voltage stabilizes.
[0018] Optionally, the device further includes: a temperature difference judgment module, used to determine whether the temperature difference of the battery within a preset second time period exceeds a preset temperature difference range after the acquisition module acquires the current temperature value of the battery of the device; and a device adjustment module, used to adjust the operating voltage of the device according to the LDO control logic unit and adjust the working mode of the external device of the device if the temperature difference exceeds the temperature difference range.
[0019] According to a third aspect of the present invention, an electronic device is also disclosed, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the battery power estimation method of the device described in the first aspect.
[0020] According to a fourth aspect of the present invention, a computer-readable storage medium is also disclosed, on which a computer program is stored, which, when executed by a processor, implements the battery power estimation method of the device described in the first aspect.
[0021] Compared with the prior art, the technical solution provided by the embodiments of the present invention has the following advantages:
[0022] This invention provides a battery power estimation scheme for a device, which obtains the current voltage and temperature values of the device's battery. If the battery is charging, the voltage deviation is determined based on the voltage value and a pre-acquired voltage deviation curve. A target temperature curve is selected from multiple pre-acquired charge / discharge temperature curves based on the temperature value, and the current battery power is calculated based on the voltage deviation and the target temperature curve. If the battery is discharging, a target temperature curve is selected from multiple pre-acquired charge / discharge temperature curves based on the temperature value, and the current battery power is calculated based on the target temperature curve.
[0023] This invention calculates the battery's capacity based on its voltage and temperature values, as well as pre-acquired voltage offset and charge / discharge temperature curves. It eliminates the need for external circuitry such as a capacity metering chip, simplifying the device's circuit design complexity and reducing hardware costs. Furthermore, it eliminates the need for real-time sampling and integration of the device's current value, reducing computational load, saving memory resources, and lowering hardware requirements. It also has less stringent requirements regarding the device's state, making it more widely applicable. Attached Figure Description
[0024] Figure 1 This is a flowchart illustrating the steps of a battery power estimation method for a device according to an embodiment of the present invention.
[0025] Figure 2 This is a schematic diagram of a charge-discharge temperature curve according to an embodiment of the present invention;
[0026] Figure 3 This is a schematic diagram of the charging curve of a battery according to an embodiment of the present invention;
[0027] Figure 4 This is a schematic diagram of the discharge curve of a battery according to an embodiment of the present invention;
[0028] Figure 5 This is a schematic diagram of a voltage offset curve according to an embodiment of the present invention;
[0029] Figure 6 This is a schematic flowchart of a device operating voltage adjustment scheme according to an embodiment of the present invention;
[0030] Figure 7 This is a structural block diagram of a battery power estimation device according to an embodiment of the present invention;
[0031] Figure 8 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present invention. Detailed Implementation
[0032] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0033] Reference Figure 1 The diagram illustrates a flowchart of a battery power estimation method for a device according to an embodiment of the present invention. The battery power estimation method specifically includes the following steps:
[0034] Step 101: Obtain the current voltage and temperature values of the device's battery.
[0035] In an embodiment of the invention, channel sampling of the device is enabled, and the current voltage and temperature values of the device's battery are obtained after filtering and smoothing. It should be noted that the device is equipped with a temperature sensor, which is used to sample and obtain the temperature value.
[0036] While acquiring voltage and temperature values, the device's charging port can also be monitored to determine whether the battery is charging or discharging. This invention does not impose specific limitations on the techniques used to detect whether the battery is charging or discharging.
[0037] Step 102: If the battery is in a charging state, determine the voltage offset of the battery based on the voltage value and the pre-acquired voltage offset curve, and select the target temperature curve from multiple pre-acquired charge and discharge temperature curves based on the temperature value.
[0038] In embodiments of the present invention, if the battery is in a charging state, there is a difference between the battery voltage and the voltage before charging. For example, the battery voltage before charging is 3.5 volts, and the battery voltage during charging is 3.6 volts. The voltage difference before and after charging is 3.6 - 3.5 = 0.1 volts. Therefore, embodiments of the present invention pre-obtain the voltage difference of the battery at different stages of charging, and fit a voltage offset curve based on the correspondence between the charging voltage and the voltage difference. In addition, the charge-discharge curves of the device's battery at different temperatures, i.e., charge-discharge temperature curves, are also pre-obtained.
[0039] Reference Figure 2 This diagram illustrates a charge-discharge temperature curve according to an embodiment of the present invention. Figure 2 In the graph, the horizontal axis represents the battery capacity, i.e., the amount of electricity the battery can discharge, measured in mAh. The vertical axis represents the battery's discharge voltage, measured in volts (V). Figure 2 In the diagram, curve w1 represents the battery's discharge capacity at 25 degrees Celsius, where a 0.5C discharge rate results in a voltage drop from approximately 4.2 volts to approximately 3.4 volts. This means the battery's operating voltage range at 25 degrees Celsius is approximately 4.2 volts to 3.4 volts, and its discharge capacity is approximately 1000 mAh. Curve w2 represents the battery's discharge capacity at -20 degrees Celsius, where a 0.2C discharge rate results in a voltage drop from approximately 3.9 volts to approximately 3.2 volts. This means the battery's operating voltage range at -20 degrees Celsius is approximately 3.9 volts to 3.2 volts, and its discharge capacity is approximately 900 mAh.
[0040] It should be noted that, in order to improve the accuracy of battery power prediction, charge and discharge temperature curves with different temperature granularities can be collected as precisely as possible.
[0041] Step 103: Calculate the current battery charge value based on the voltage offset and the target temperature curve.
[0042] In an embodiment of the present invention, the current actual voltage of the battery can be determined based on the voltage offset, and then the current charge value of the battery can be calculated based on the actual voltage and the target temperature curve.
[0043] Step 104: If the battery is in a discharging state, select the target temperature curve from multiple pre-acquired charge and discharge temperature curves based on the temperature value, and calculate the current charge value of the battery based on the target temperature curve.
[0044] In this embodiment of the invention, the process of selecting the target temperature curve in step 104 is similar to that in step 102, and will not be described again here. Since the battery is not charging at this time but is in a discharging state, the current battery capacity can be directly calculated based on the target temperature curve. That is, the current battery capacity is calculated based on the current battery voltage and the target temperature curve.
[0045] This invention provides a battery power estimation scheme for a device, which obtains the current voltage and temperature values of the device's battery. If the battery is charging, the voltage deviation is determined based on the voltage value and a pre-acquired voltage deviation curve. A target temperature curve is selected from multiple pre-acquired charge / discharge temperature curves based on the temperature value, and the current battery power is calculated based on the voltage deviation and the target temperature curve. If the battery is discharging, a target temperature curve is selected from multiple pre-acquired charge / discharge temperature curves based on the temperature value, and the current battery power is calculated based on the target temperature curve.
[0046] This invention calculates the battery's capacity based on its voltage and temperature values, as well as pre-acquired voltage offset and charge / discharge temperature curves. It eliminates the need for external circuitry such as a capacity metering chip, simplifying the device's circuit design complexity and reducing hardware costs. Furthermore, it eliminates the need for real-time sampling and integration of the device's current value, reducing computational load, saving memory resources, and lowering hardware requirements. It also has less stringent requirements regarding the device's state, making it more widely applicable.
[0047] In a preferred embodiment of the present invention, the step of obtaining the voltage offset curve may include: sampling the battery voltage value before charging and after charging at different stages of the battery's charging state to obtain the voltage difference between the battery before and after charging; fitting the voltage difference at different stages and the corresponding charging voltage to obtain a voltage offset curve; wherein the voltage offset curve represents the correspondence between the voltage difference and the charging voltage. In practical applications, the charge-discharge curve of the battery within the normal temperature range can be obtained in advance. (Refer to...) Figure 3 This diagram illustrates a charging curve of a battery according to an embodiment of the present invention. Figure 3 In the diagram, the horizontal axis represents the timestamp, the left vertical axis represents the battery voltage, and the right vertical axis represents the battery current. Figure 3 It includes charging voltage and current curves. (Refer to...) Figure 4 The diagram illustrates a discharge curve of a battery according to an embodiment of the present invention. Figure 4 In the diagram, the horizontal axis represents the timestamp, the left vertical axis represents the battery voltage, and the right vertical axis represents the battery current. Figure 4 It includes discharge voltage and current curves. (Refer to...) Figure 5 This diagram illustrates a voltage offset curve according to an embodiment of the present invention. Specifically, Figure 5 This represents the correspondence between charging voltage and voltage offset. Furthermore, the shape of the voltage offset curve is strongly correlated with the battery type. Different battery types can correspond to different voltage offset curves. This embodiment of the invention only uses lithium batteries as an example; other battery types can be implemented with reference to the technical content of this embodiment. Figure 5 In the diagram, the horizontal axis represents the charging voltage, and the vertical axis represents the voltage offset. Each dot represents the correspondence between the sampled charging voltage and the voltage offset. By fitting multiple dots, the result is obtained. Figure 5 The voltage offset curve is shown by the dashed line, and a corresponding polynomial for the voltage offset curve can be generated, for example, y = 2.5113x. 3 +30.498x 2 -123.55x+167.13, where x represents the charging voltage and y represents the voltage offset.
[0048] In a preferred embodiment of the present invention, if a charger connection is detected at the charging port of the device, the instantaneous voltage offset of the battery is dynamically calculated, and the instantaneous charging voltage of the battery is obtained. Then, the validity of the instantaneous voltage offset is determined based on the instantaneous charging voltage and the voltage offset curve. If the instantaneous voltage offset is valid, the battery capacity value is refreshed. If the instantaneous voltage offset is invalid, the instantaneous voltage offset is recalculated after the voltage stabilizes, and the validity of the instantaneous voltage offset is determined again, until the instantaneous voltage offset is valid.
[0049] In practical applications, one method for determining the validity of an instantaneous voltage offset based on the instantaneous charging voltage and voltage offset curve is as follows: A target voltage offset corresponding to the instantaneous charging voltage is searched in the voltage offset curve; the instantaneous voltage offset and the target voltage offset are compared; if the offset difference between the instantaneous voltage offset and the target voltage offset is within a preset offset range, the instantaneous voltage offset is considered valid; if the offset difference is outside the offset range, the instantaneous voltage offset is considered invalid. For example, if the instantaneous charging voltage is 3.6 volts and the instantaneous voltage offset is 0.3 volts, a target voltage offset of 0.2 volts corresponding to 3.6 volts is found in the voltage offset curve. Comparing the instantaneous voltage offset and the target voltage offset, the offset difference is found to be 0.1 volts. If the offset range is ±0.15 volts, the offset difference is within the offset range, and the instantaneous voltage offset is considered valid. If the offset range is ±0.08 volts, the offset difference is outside the offset range, and the instantaneous voltage offset is considered invalid.
[0050] In a preferred embodiment of the present invention, if a charger disconnection action is detected at the charging port of the device, the battery voltage offset is cleared, and the operation step of estimating the battery charge value during the battery discharge phase is performed.
[0051] In a preferred embodiment of the present invention, after obtaining the current battery voltage value of the device, it is determined whether the voltage fluctuation value of the battery within a preset first time period exceeds a preset fluctuation range. If the voltage fluctuation value exceeds the fluctuation range, the voltage value is obtained again after the battery voltage stabilizes. For example, after obtaining the current battery voltage value, if the voltage fluctuation value within a preset first time period of 2 seconds exceeds the preset fluctuation range by 5%, it can be considered that the device is in network communication or other power consumption mode, and the voltage value is obtained again after the battery voltage recovers to stability.
[0052] In a preferred embodiment of the present invention, after obtaining the current temperature value of the device's battery, it is determined whether the temperature difference of the battery within a preset second time period exceeds a preset temperature difference range. If the temperature difference exceeds the temperature difference range, the operating voltage of the device is adjusted according to the low dropout regulator (LDO) control logic unit, and the operating mode of the external device is also adjusted. For example, after obtaining the current temperature value of the battery, if the temperature difference within a preset second time period of 1 minute exceeds a preset temperature difference range of ±5 degrees Celsius, the operating voltage of the device can be adjusted by the LDO control logic unit. If the temperature difference exceeds the temperature difference range due to a decrease in temperature value, the operating voltage of the device can be appropriately increased by the LDO control logic unit. If the temperature difference exceeds the temperature difference range due to an increase in temperature value, the operating voltage of the device can be appropriately decreased by the LDO control logic unit. Whether increasing or decreasing the operating voltage of the device, or changing the operating mode of the external device, the purpose is to ensure that the battery can be fully discharged.
[0053] Based on the above description of an embodiment of a method for estimating battery power for a device, a scheme for adjusting the operating voltage of the device is described below. (Refer to...) Figure 6 The diagram illustrates a flowchart of a device operating voltage adjustment scheme according to an embodiment of the present invention. This adjustment scheme requires prior acquisition of the device battery's charge-discharge curves within the normal temperature range, charge-discharge temperature curves at different temperatures, and charging voltage offset curves.
[0054] After power-on, the device can be in normal operating mode, which may include either active or sleep mode. The device's battery voltage and temperature are sampled using an analog-to-digital converter (ADC) after filtering and smoothing. Simultaneously, the device's charging port is monitored to determine whether the battery is charging or discharging.
[0055] If the battery is charging, the voltage offset is determined based on the current voltage value and the charging voltage offset curve. The target temperature curve is determined based on the temperature value. Then, the current battery level is estimated based on the voltage offset and the target temperature curve.
[0056] If the battery is in a discharging state, the current charge level is directly estimated based on the target temperature curve.
[0057] If a charger is detected to be connected to the device's charging port, the instantaneous voltage offset is dynamically calculated and compared with the target voltage offset in the voltage offset curve to determine whether the instantaneous voltage offset is valid. If the instantaneous voltage offset is valid, the power value is refreshed to reduce fluctuations in the power value.
[0058] If a charger disconnection is detected at the device's charging port, the voltage offset is cleared, and the process switches to the battery power estimation flow when the battery is in a discharging state.
[0059] When obtaining the battery voltage value, the adjustment scheme needs to filter the battery voltage. For example, if the battery voltage value fluctuates significantly within a short period of time (e.g., within 2 seconds) (e.g., the fluctuation value is greater than 5%), it is assumed that the device is in network communication or other power consumption mode, and the voltage value is obtained again after the battery voltage value returns to stability.
[0060] After obtaining the battery temperature value, the adjustment scheme needs to determine whether the temperature difference of the device within a certain period of time is within the preset temperature difference range. If the temperature difference exceeds the temperature difference range, the LDO control logic unit is used to adjust the operating voltage of the device and adjust the working mode of the external device.
[0061] The battery power estimation scheme provided in this embodiment of the invention has a relatively simple circuit design, strict hardware cost control, low resource consumption, fast estimation speed, and wide applicability.
[0062] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0063] Reference Figure 7 The diagram illustrates a structural block diagram of a battery power estimation device according to an embodiment of the present invention. This battery power estimation device may specifically include the following modules:
[0064] The acquisition module 71 is used to acquire the current voltage and temperature values of the device's battery.
[0065] The voltage offset determination module 72 is used to determine the voltage offset of the battery based on the voltage value and a pre-acquired voltage offset curve if the battery is in a charging state.
[0066] Temperature curve determination module 73 is used to select a target temperature curve from a plurality of pre-acquired charge and discharge temperature curves based on the temperature value if the battery is in a charging state.
[0067] The power value calculation module 74 is used to calculate the current power value of the battery based on the voltage offset and the target temperature curve if the battery is in a charging state.
[0068] The temperature curve determination module 73 is further configured to select the target temperature curve from a plurality of pre-acquired charge-discharge temperature curves based on the temperature value if the battery is in a discharging state.
[0069] The power value calculation module 74 is also used to calculate the current power value of the battery based on the target temperature curve if the battery is in a discharging state.
[0070] In a preferred embodiment of the present invention, the device further includes: a voltage offset curve acquisition module, used to acquire the voltage offset curve;
[0071] The voltage offset curve acquisition module includes:
[0072] A voltage sampling module is used to sample the voltage value of the battery before charging and the voltage value after charging at different stages when the battery is in a charging state, so as to obtain the voltage difference of the battery before charging and after charging.
[0073] The curve fitting module is used to fit the voltage offset curve based on the voltage difference at different stages and the corresponding charging voltage.
[0074] The voltage offset curve represents the correspondence between the voltage difference and the charging voltage.
[0075] In a preferred embodiment of the present invention, the device further includes:
[0076] The instantaneous voltage acquisition module is used to dynamically calculate the instantaneous voltage offset of the battery and acquire the instantaneous charging voltage of the battery when the charging port of the device detects the charging action of the charger being connected.
[0077] A voltage validity determination module is used to determine whether the instantaneous voltage offset is valid based on the instantaneous charging voltage and the voltage offset curve;
[0078] The battery power refresh module is used to refresh the battery power value if the instantaneous voltage offset is valid.
[0079] In a preferred embodiment of the present invention, the voltage validity determination module includes:
[0080] An offset search module is used to search for the target voltage offset corresponding to the instantaneous charging voltage in the voltage offset curve;
[0081] An offset comparison module is used to compare the instantaneous voltage offset with the target voltage offset;
[0082] The valid confirmation module is used to consider the instantaneous voltage offset to be valid if the offset difference between the instantaneous voltage offset and the target voltage offset is within a preset offset range.
[0083] An invalidity confirmation module is used to consider the instantaneous voltage offset to be invalid if the offset difference is outside the offset range.
[0084] In a preferred embodiment of the present invention, the device further includes:
[0085] An offset clearing module is used to clear the voltage offset when the charging port of the device detects that the charger has been disconnected.
[0086] In a preferred embodiment of the present invention, the device further includes:
[0087] The voltage fluctuation judgment module is used to determine whether the voltage fluctuation value of the battery in a preset first time period exceeds a preset fluctuation range after the acquisition module 71 acquires the current voltage value of the battery of the device.
[0088] The acquisition module 71 is further configured to, if the voltage fluctuation value exceeds the fluctuation range, reacquire the voltage value after the battery voltage stabilizes.
[0089] In a preferred embodiment of the present invention, the device further includes:
[0090] The temperature difference judgment module is used to determine whether the temperature difference of the battery in a preset second time period exceeds a preset temperature difference range after the acquisition module 71 acquires the current temperature value of the battery of the device.
[0091] The device adjustment module is used to adjust the operating voltage of the device according to the LDO control logic unit and adjust the working mode of the external devices of the device if the temperature difference exceeds the temperature difference range.
[0092] This invention also provides an electronic device, see [link to relevant documentation]. Figure 8 The device includes a processor 801, a memory 802, and a computer program 8021 stored in the memory 802 and executable on the processor 801. When the processor 801 executes the program 8021, it implements the battery power estimation method of the device described in the foregoing embodiment.
[0093] This invention also provides a readable storage medium storing a computer program that, when executed by a processor, implements the battery power estimation method of the device described in the foregoing embodiments.
[0094] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0095] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0096] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0097] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0098] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0099] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0100] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present invention.
[0101] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0102] The battery power estimation method and apparatus of the present invention have been described in detail above. Specific examples have been used to illustrate the principle and implementation of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core idea of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation and application scope based on the idea of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A method for estimating the battery power of a device, characterized in that, include: Obtain the current battery voltage and temperature values of the device; If the battery is in a charging state, the voltage offset of the battery is determined according to the voltage value and the pre-acquired voltage offset curve, and the target temperature curve is selected from multiple pre-acquired charge and discharge temperature curves according to the temperature value. The current charge level of the battery is calculated based on the voltage offset and the target temperature curve. If the battery is in a discharging state, the target temperature curve is selected from multiple pre-acquired charge and discharge temperature curves based on the temperature value, and the current charge value of the battery is calculated based on the target temperature curve. The step of obtaining the voltage offset curve includes: At different stages of the battery's charging state, the voltage value of the battery before charging and after charging are sampled to obtain the voltage difference between the battery before charging and after charging. The voltage offset curve is obtained by fitting the voltage difference and the corresponding charging voltage at different stages; The voltage offset curve represents the correspondence between the voltage difference and the charging voltage.
2. The method according to claim 1, characterized in that, The method further includes: When the charging port of the device detects a charger connection action, the instantaneous voltage offset of the battery is dynamically calculated, and the instantaneous charging voltage of the battery is obtained. The validity of the instantaneous voltage offset is determined based on the instantaneous charging voltage and the voltage offset curve. If the instantaneous voltage offset is valid, the battery charge value is refreshed.
3. The method according to claim 2, characterized in that, The step of determining whether the instantaneous voltage offset is valid based on the instantaneous charging voltage and the voltage offset curve includes: The target voltage offset corresponding to the instantaneous charging voltage is searched in the voltage offset curve; Compare the instantaneous voltage offset with the target voltage offset; If the offset difference between the instantaneous voltage offset and the target voltage offset is within a preset offset range, then the instantaneous voltage offset is considered valid. If the offset difference is outside the offset range, the instantaneous voltage offset is considered invalid.
4. The method according to claim 1, characterized in that, The method further includes: When the charging port of the device detects that the charger has disconnected, the voltage offset is cleared, and the operation steps of selecting the target temperature curve from multiple pre-acquired charge and discharge temperature curves according to the temperature value and calculating the current charge value of the battery according to the target temperature curve are executed.
5. The method according to claim 1, characterized in that, After obtaining the current battery voltage value of the device, the method further includes: Based on the voltage value, determine whether the voltage fluctuation value of the battery within a preset first time period exceeds a preset fluctuation range; If the voltage fluctuation value exceeds the fluctuation range, the voltage value will be reacquired after the battery voltage stabilizes.
6. The method according to claim 1, characterized in that, After obtaining the current temperature value of the device's battery, the method further includes: Based on the temperature value, determine whether the temperature difference of the battery within a preset second time period exceeds a preset temperature difference range; If the temperature difference exceeds the temperature difference range, the operating voltage of the device is adjusted according to the LDO control logic unit, and the working mode of the external device of the device is adjusted.
7. A battery power estimation device for a device, characterized in that, include: The acquisition module is used to acquire the current voltage and temperature values of the device's battery. A voltage offset determination module is used to determine the voltage offset of the battery based on the voltage value and a pre-acquired voltage offset curve if the battery is in a charging state. The temperature curve determination module is used to select a target temperature curve from a plurality of pre-acquired charge and discharge temperature curves based on the temperature value if the battery is in a charging state. A power value calculation module is used to calculate the current power value of the battery based on the voltage offset and the target temperature curve if the battery is in a charging state. The temperature curve determination module is further configured to select the target temperature curve from a plurality of pre-acquired charge-discharge temperature curves based on the temperature value if the battery is in a discharging state. The power value calculation module is also used to calculate the current power value of the battery based on the target temperature curve if the battery is in a discharging state. The voltage offset curve acquisition module includes: A voltage sampling module is used to sample the voltage value of the battery before charging and the voltage value after charging at different stages when the battery is in a charging state, so as to obtain the voltage difference of the battery before charging and after charging. The curve fitting module is used to fit the voltage offset curve based on the voltage difference at different stages and the corresponding charging voltage. The voltage offset curve represents the correspondence between the voltage difference and the charging voltage.
8. An electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the battery power estimation method of the device according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by the processor, the program implements the battery power estimation method of the device according to any one of claims 1 to 6.
Citation Information
Patent Citations
Method and device for estimating remaining capacity of battery, and electronic equipment
CN110879361A
Method, device and apparatus for determining electric quantity of battery and storage medium
CN111142032A