[go: up one dir, main page]

CN119689286A - Method for determining battery power and terminal equipment - Google Patents

Method for determining battery power and terminal equipment Download PDF

Info

Publication number
CN119689286A
CN119689286A CN202411577903.6A CN202411577903A CN119689286A CN 119689286 A CN119689286 A CN 119689286A CN 202411577903 A CN202411577903 A CN 202411577903A CN 119689286 A CN119689286 A CN 119689286A
Authority
CN
China
Prior art keywords
capacity
battery
full charge
current
power
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202411577903.6A
Other languages
Chinese (zh)
Inventor
杨成贺
颜尚华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Pax Smart New Technology Co ltd
Original Assignee
Shenzhen Pax Smart New Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Pax Smart New Technology Co ltd filed Critical Shenzhen Pax Smart New Technology Co ltd
Priority to CN202411577903.6A priority Critical patent/CN119689286A/en
Publication of CN119689286A publication Critical patent/CN119689286A/en
Pending legal-status Critical Current

Links

Landscapes

  • Secondary Cells (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)

Abstract

The application discloses a method for determining battery power and terminal equipment, which comprises the steps of acquiring charge and discharge data in a charge and discharge process of a first battery connected with the terminal equipment currently, wherein the charge and discharge data comprise charge data of the first battery in the charge process and/or discharge data in the discharge process, and determining the current full charge capacity of the first battery according to at least one of first capacity, second capacity and third capacity under the condition that the current data updating condition is determined according to the charge and discharge data, wherein the first capacity is the historical full charge capacity stored in a flash memory of a battery gauge of the terminal equipment, the second capacity is the preset full charge capacity of the first battery, and the third capacity is equal to the total capacity charged in the charge process or the total capacity discharged in the discharge process. Not only can the accuracy and efficiency of electricity quantity learning be improved, but also the applicability and flexibility of the scheme can be improved, and the user experience is better.

Description

Battery power determining method and terminal equipment
Technical Field
The application belongs to the technical field of batteries, and particularly relates to a method for determining battery power and terminal equipment.
Background
The intelligent terminal device is widely applied to various industries such as medical treatment, finance, retail, education, entertainment and the like. For portable or mobile terminal devices, it is often necessary to connect a rechargeable battery. An electricity meter is generally provided in such terminal devices to detect the amount of electricity of the battery in real time in order to better manage the battery and provide necessary battery information to the user. For example, some terminal devices having a display screen are capable of displaying the amount of power of a battery in real time. In view of a long-time use or the like, the battery of some terminal devices is set to be detachable. For terminal devices with pluggable batteries, the reconnected battery may be different from the last connected battery after the terminal device is disconnected from the battery, so how the fuel gauge quickly and accurately learns the charge of the connected battery after each re-power-up is a priority.
In the prior art, an electricity meter of a terminal device generally adopts a static electricity calibration algorithm to learn electricity. I.e. when the terminal device is powered off or dormant, the fuel gauge detects whether the battery is in a static state at regular time intervals. Each time it is determined that the battery is in a static state, the fuel gauge collects an open circuit voltage of the battery, and estimates the amount of fuel of the battery at that time based on the open circuit voltage. And updating the full charge capacity when the change amount of the twice estimated electric quantity exceeds a change amount threshold value and the deviation between the full charge capacity obtained by further calculation according to the twice estimated electric quantity and the recorded full charge capacity is smaller than a deviation threshold value. According to the updated full charge capacity, the battery capacity can be calibrated, and the purpose of learning the battery capacity is achieved.
However, some batteries with high electrochemical stability, such as lithium iron phosphate batteries, have features of small voltage variation and large power variation. In the static electricity quantity calibration algorithm, the open circuit voltage of the battery collected by the electricity quantity meter has larger deviation, so that the electricity quantity determined for the battery is inaccurate, and the electricity quantity learning effect is poor.
Disclosure of Invention
The embodiment of the application provides a method for determining battery power, a device for determining battery power, terminal equipment, a computer readable storage medium and a computer program product, which can quickly and accurately determine the current full charge capacity of a battery according to at least one of the historical full charge capacity stored in a flash memory of an electricity meter, the preset full charge capacity of the battery and the total capacity charged or discharged in the charging and discharging process under the condition that the current data updating condition is met according to charging and discharging data in the charging and discharging process of the battery, so that the efficiency and the accuracy of electricity meter power learning can be remarkably improved.
A first aspect of an embodiment of the present application provides a method for determining a battery power, including:
acquiring charge and discharge data in a charge and discharge process of a first battery connected with the terminal equipment at present, wherein the charge and discharge data comprise charge data of the first battery in the charge process and/or discharge data of the first battery in the discharge process;
And under the condition that the current data updating condition is met according to the charging and discharging data, determining the current full charge capacity of the first battery according to at least one of a first capacity, a second capacity and a third capacity, wherein the first capacity is the historical full charge capacity stored in a flash memory of an electricity meter of the terminal equipment, the second capacity is the preset full charge capacity of the first battery, and the third capacity is equal to the total capacity charged in the charging process or the total capacity discharged in the discharging process.
In one embodiment, determining the current full charge capacity of the first battery based on at least one of the first capacity, the second capacity, and the third capacity comprises:
in the case that the data update condition is determined to be currently satisfied, a current full charge capacity is determined according to electric quantity learning information of the electric quantity meter and one of the first capacity, the second capacity or the third capacity, wherein the electric quantity learning information includes first information indicating that the electric quantity meter has not completed a first learning process for the first battery or second information indicating that the electric quantity meter has completed the first learning process for the first battery.
In one embodiment, determining the current full charge capacity based on the charge learning information of the fuel gauge and one of the first capacity, the second capacity, or the third capacity includes:
under the condition that the electric quantity learning information of the electric quantity meter is first information, determining the current full charge capacity according to the first capacity or the second capacity;
In the case where the electric quantity learning information of the electric quantity meter is the second information, the current full charge capacity is determined according to one of the first capacity, the second capacity, or the third capacity.
In one embodiment, in the case where the electric quantity learning information of the electric quantity meter is the first information, determining the current full charge capacity according to the first capacity or the second capacity includes:
Reading check data stored in a flash memory of the fuel gauge, wherein the check data comprises a numerical value of a first capacity and a first check value determined according to the first capacity;
under the condition that the first check value is equal to a second check value corresponding to the first capacity, determining that the current full charge capacity is equal to the first capacity;
And in the case that the first check value and the second check value are not equal, or in the case that the check data is not read, determining that the current full charge capacity is equal to the second capacity.
In one embodiment, the method further comprises:
Determining whether the first battery reaches the attenuation condition according to a first difference between the third capacity and the second capacity and a first difference threshold value under the condition that the data updating condition is met currently and the electric quantity learning information of the electric quantity meter is second information;
if so, updating the check data stored in the flash memory of the fuel gauge according to the value of the third capacity and the third check value corresponding to the third capacity under the condition that the second difference between the third capacity and the first capacity is larger than or equal to a second difference threshold value;
if not, the verification data stored in the flash memory of the fuel gauge is cleared.
In one embodiment, the method further comprises:
In the case that it is determined that the data update condition is currently satisfied and the electricity amount learning information of the electricity meter is the first information, the electricity amount learning information of the electricity meter is updated to the second information, and/or
In the case where it is determined that the terminal device is disconnected from the first battery, the electricity amount learning information of the electricity amount meter is updated to the first information.
In one embodiment, prior to determining the current full charge capacity of the first battery, the method further comprises:
in the charging process, if the first battery is determined to be full according to the charging data, the current condition for data update is determined to be met, and/or
During the discharging, if it is determined from the discharging data that the electric quantity of the first battery has been discharged, it is determined that the data update condition is currently satisfied.
In one embodiment, after determining the current full charge capacity of the first battery, the method further comprises:
Determining and updating the current remaining capacity and/or the current remaining capacity of the first battery under the condition that the electric quantity of the first battery is determined to be full according to the charging data, wherein the current remaining capacity is equal to the current full charging capacity, the current remaining capacity is equal to the full charging capacity, and/or
And under the condition that the electric quantity of the first battery is determined to be emptied according to the discharging data, determining and updating the current residual capacity and/or the current residual electric quantity of the first battery, wherein the current residual capacity is equal to the emptying capacity, and the current residual electric quantity is equal to the emptying electric quantity.
In one embodiment, the method further comprises:
responding to a starting instruction, and determining a first battery curve parameter corresponding to a first battery;
if the first battery curve parameter is different from the second battery curve parameter stored in the fuel gauge, updating the first battery curve parameter into the fuel gauge so that the fuel gauge can determine the initial electric quantity of the first battery according to the first battery curve parameter;
the first capacity stored in the flash memory of the fuel gauge is purged.
A second aspect of an embodiment of the present application provides a device for determining an electric quantity of a battery, including:
the terminal equipment comprises an acquisition module, a storage module and a storage module, wherein the acquisition module is used for acquiring charge and discharge data in the charge and discharge process of a first battery connected with the terminal equipment at present, and the charge and discharge data comprise the charge data of the first battery in the charge process and/or the discharge data in the discharge process;
The first determining module is configured to determine, when it is determined that the data update condition is currently satisfied according to the charge and discharge data, a current full charge capacity of the first battery according to at least one of a first capacity, a second capacity, and a third capacity, where the first capacity is a historical full charge capacity stored in a flash memory of a fuel gauge of the terminal device, the second capacity is a preset full charge capacity of the first battery, and the third capacity is equal to a total capacity charged in a charging process or a total capacity discharged in a discharging process.
A third aspect of the embodiments of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the above method for determining battery power when executing the computer program.
A fourth aspect of the embodiments of the present application provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the steps of the above-described method for determining a battery level.
A fifth aspect of the embodiments of the present application provides a computer program product enabling a terminal device to carry out the steps of the above method for determining a battery level when the computer program product is run on the terminal device.
In the method for determining battery power according to the first aspect of the embodiment of the present application, in the charging and discharging process of the battery of the terminal device, when it is determined that the data update condition is currently satisfied according to the charging and discharging data of the battery, the current full charge capacity of the battery is rapidly and accurately determined according to at least one of the historical full charge capacity stored in the flash memory of the fuel gauge, the preset full charge capacity of the battery, and the total capacity charged or discharged in the charging and discharging process. On the one hand, the method and the device have the advantages that the charge and discharge data acquired by the electricity meter are more reliable and more accurately reflect the change of the electric quantity of the battery in the charge and discharge process of the battery, so that whether the data updating condition is met at present or not can be accurately determined, the accuracy and the efficiency of electric quantity learning can be improved, on the other hand, various possible scenes of the battery connected with the terminal equipment in the electric quantity learning process are fully considered, under the condition that the data updating condition is met at present is determined, the full charge capacity of the battery in the scene can be rapidly and accurately determined according to three different capacitance values corresponding to the scenes, and therefore the accuracy and the efficiency of electric quantity learning of the electricity meter can be improved, the applicability and the flexibility of the scheme can be improved, and the user experience is better.
It will be appreciated that the advantages of the second to fifth aspects may be found in the relevant description of the first aspect, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a method for determining battery power according to an embodiment of the present application;
Fig. 2 is a schematic partial structure of a terminal device according to an embodiment of the present application;
FIG. 3 is a flowchart of a method for determining battery power according to another embodiment of the present application;
FIG. 4 is a flowchart of a method for determining battery power according to another embodiment of the present application;
fig. 5 is a schematic structural diagram of a battery power determining device according to another embodiment of the present application;
Fig. 6 is a schematic structural diagram of a terminal device according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth such as the particular system architecture, techniques, etc., in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It should be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance.
Reference in the specification to "one embodiment" or "some embodiments" or the like means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
As described above, in the prior art, the electricity meter of the terminal device generally employs a static electricity calibration algorithm to complete electricity learning. I.e. when the terminal device is powered off or dormant, the fuel gauge detects whether the battery is in a static state at regular time intervals. Each time it is determined that the battery is in a static state, the fuel gauge collects an open circuit voltage of the battery, and estimates the amount of fuel of the battery at that time based on the open circuit voltage. And updating the full charge capacity when the change amount of the twice estimated electric quantity exceeds a change amount threshold value and the deviation between the full charge capacity obtained by further calculation according to the twice estimated electric quantity and the recorded full charge capacity is smaller than a deviation threshold value. According to the updated full charge capacity, the battery capacity can be calibrated, and the purpose of learning the battery capacity is achieved.
However, for some batteries with higher electrochemical stability, the effect of performing electric quantity learning by using the conventional static electric quantity calibration algorithm is poor, which is particularly difficult to quickly learn the accurate electric quantity of the battery.
The following will describe an example of a lithium iron phosphate battery. On the one hand, the lithium iron phosphate battery has the characteristic of flat voltage platform. The method is characterized by small voltage change and large electric quantity change (the electric quantity change of 30% in the flat area corresponds to the voltage change of about 1 mV). This requires a high accuracy in the analog-to-digital converter of the fuel gauge to accurately capture the small voltage variations. If the accuracy of the analog-to-digital converter is insufficient, even small measurement errors can be amplified in the calculation of the electrical quantity, resulting in inaccurate calculated electrical quantity data. On the other hand, lithium iron phosphate batteries require a longer time (typically greater than 15 minutes) to recover to a more accurate open circuit voltage after the load is pulled down. The voltage recovery process is slow due to its relatively slow electrochemical reaction rate. Therefore, when the terminal equipment is shut down or dormant, the voltage of the lithium iron phosphate battery is slowly recovered, so that the open-circuit voltage of the battery collected by the analog-to-digital converter of the electricity meter has large deviation, and accurate electricity quantity is difficult to quickly learn. Therefore, the logic of the conventional stationary charge calibration algorithm cannot meet the learning method for the charge of the lithium iron phosphate battery.
In order to at least partially solve the above technical problems, an embodiment of the present application provides a method for determining a battery power. The portable terminal device is applicable to various terminal devices which are powered by rechargeable batteries, particularly to terminal devices powered by pluggable batteries, including but not limited to portable terminal devices such as smart phones, notebook computers, tablet computers, portable Point of sale terminals (POS terminals for short), interphones, electronic watches, sport bracelets, cameras, video cameras, recording pens and other movable terminal devices including movable robots. As shown in fig. 1, the method for determining the battery power provided by the embodiment of the application includes the following steps:
Step S110, in the charging and discharging process of the first battery currently connected to the terminal device, charging and discharging data are obtained. The charging and discharging data comprise charging data of the first battery in a charging process and/or discharging data of the first battery in a discharging process.
In the embodiment of the application, the first battery is any battery connected with the current terminal equipment. In one example, the battery in the terminal device is removable, and the terminal device may be connected to any type of battery. Taking POS terminals as an example, for convenience of use, one POS terminal may be equipped with a plurality of batteries of the same model. A fully charged backup battery may be replaced when the charge of one battery is depleted, or a perfect battery may be replaced when the service life of one battery reaches a certain limit. Of course, the battery of the terminal device may be non-detachable, and the terminal device may be always connected to the same battery.
In the embodiment of the present application, the charging and discharging process of the first battery may include a charging process and/or a discharging process of the first battery. Accordingly, the charge and discharge data may include charge data of the first battery during each charge and discharge data of the first battery during each discharge. The charging and discharging data can be specifically related data which can reflect the charging and discharging conditions and is acquired and calculated by the battery management module in the charging and discharging process of the battery. Specifically, the charging data may include a current, a voltage, an accumulated charged capacity of the battery during the current charging, a state of health of the battery (e.g., a degree of aging of the battery, a change in internal resistance, etc.), a charging temperature, a charging time, an energy conversion efficiency, etc. Similarly, the discharge data may include current, voltage, accumulated discharged capacity of the battery during the current discharge, battery state of health (e.g., battery aging, internal resistance change, etc.), discharge temperature, discharge time, energy conversion efficiency, etc.
In one specific example, the terminal device includes a central processing unit (Centra l Process ing Un it, CPU) and an electricity meter. When the terminal equipment receives a starting instruction (such as a user presses a starting key) each time, the CPU communicates with the fuel gauge through the I2C bus, the battery curve parameters of the first battery connected with the terminal equipment at present are transmitted to the fuel gauge, and the fuel gauge chip is reset. The battery curve parameters may be a data table of standard parameters related to the charge of each battery, which may be established by the fuel gauge manufacturer from pre-measured real data of different brands and different models of batteries. The data table can specifically comprise a corresponding table of battery temperature and capacity in a battery model, a corresponding table of open circuit voltage and electric quantity in the battery model, an internal resistance table and the like. It will be appreciated that the battery curve parameters may be different for different brands and different models of batteries. Then, the current battery voltage, the current battery current and the current battery temperature are acquired by the fuel gauge through the analog-to-digital converter. The preset full charge capacity of the battery can be obtained according to the current battery temperature and the corresponding table of the battery temperature and the capacity in the battery curve parameters. And then, calculating to obtain the current internal resistance of the battery through the current battery temperature, the current battery voltage and an internal resistance table in battery curve parameters. Further, the open circuit voltage of the battery (open circuit voltage=battery voltage+battery current×battery internal resistance) may be calculated from the current battery internal resistance, the current battery voltage, and the current battery current. And finally, obtaining the current battery electric quantity, namely the initial electric quantity of the first battery according to the open-circuit voltage of the battery and the correspondence table of the open-circuit voltage and the electric quantity in the battery curve parameters, and completing the initialization of the electric quantity meter. After the initialization is completed, if the battery is charged, the fuel gauge can collect charging data related to the charging process, such as charging current and charging voltage, accumulated charging capacity, and the like in real time. If the battery is not charged, the battery is usually in a discharging state in the process of using the terminal device, and the electricity meter can also collect discharging data such as discharging voltage, discharging current and the like in the discharging process of the battery in real time.
Step S120, in the case where it is determined that the data update condition is currently satisfied according to the charge/discharge data, determining the current full charge capacity of the first battery according to at least one of the first capacity, the second capacity, and the third capacity. The first capacity is the historical full charge capacity stored in the flash memory of the electricity meter of the terminal equipment, the second capacity is the preset full charge capacity of the first battery, and the third capacity is equal to the total capacity charged in the charging process or the total capacity discharged in the discharging process.
In the embodiment of the application, under the condition that the charge completion degree or the discharge completion degree is determined to be the preset completion degree, the current meeting of the data updating condition can be determined. The preset completion degree can be set according to actual requirements and can be represented by a proper index. In one example, the preset completion may be 100%, i.e., indicating that the charge has been full during charging or that the charge has been empty during discharging. For example, the electricity meter may determine whether the amount of electricity has been full based on the charging data during the charging process. If yes, it may be determined that the data update condition is currently satisfied. In another example, the preset completion may be other suitable values. For example, a voltage reference value table of batteries of different types can be established through testing in advance, and the voltage value of the battery can be corresponding to the battery power percentage. For example, for lithium iron phosphate batteries, a table may be tested to determine the correspondence of the battery's charge voltage to the battery's charge percentage. I.e. one charge percentage for each voltage value. A curve regarding the relationship between the charging voltage and the battery level may be fitted according to the correspondence table. And the preset completion degree can be determined according to the electric quantity percentage corresponding to the turning point of the curve. For example, the charge profile of a lithium iron phosphate battery varies more smoothly over approximately 10% to 94% of the charge and more steeply over 95% to 100% of the charge. Thus, the preset degree of completion may be set to 95%. And can judge whether the open circuit voltage of the battery is the open circuit voltage when the electric quantity is 95% in the corresponding relation table in the charging process. If yes, it may be determined that the data update condition is currently satisfied.
In the embodiment of the application, the first capacity is a historical full charge capacity stored in a flash memory of an electricity meter of the terminal equipment. The historical full charge capacity may be the full charge capacity of the battery that the fuel gauge learned last time, or may be the full charge capacity of the battery that the fuel gauge learned some time before (e.g., updated full charge capacity if a battery capacity fade is determined). For example, in the case where it was last determined that the data update condition was satisfied, the fuel gauge determines and stores the full charge capacity of the same battery as the current battery model. In the embodiment of the application, the second capacity is a preset full charge capacity of the first battery. Specifically, the full charge capacity may be calculated according to the battery curve parameter of the first battery. As previously described, the fuel gauge may collect the battery temperature of the first battery via the analog-to-digital converter during the initialization process. The preset full charge capacity of the first battery can be obtained by searching from a corresponding table of battery temperature and capacity in battery curve parameters according to the battery temperature. The third capacity may be, for example, the sum of the capacitances accumulated during the entire charging process (the unit may be ampere hours or milliampere hours), or the sum of the capacitances accumulated during the discharging process. The charge-in capacitance and the discharge-out capacitance may be determined by any suitable method, and the present application is not limited thereto. For example, the coulometer calculates the charge or discharge capacity based on the current and voltage values acquired by the analog-to-digital converter.
In the embodiment of the application, under the condition that the current meeting of the data updating condition is determined, the current full charge capacity of the first battery is determined according to at least one of the first capacity, the second capacity and the third capacity. In one example, a plurality of suitable screening methods may be employed to select one of the first capacity, the second capacity, and the third capacity, and the current full charge capacity of the first battery may be determined based on the selected one. For example, the selected one may be directly taken as the current full charge capacity of the first battery. In another example, these three capacities may also be counted to obtain a new capacity as the current full charge capacity of the first battery. For example, a weighted average method may be used to obtain the current full charge capacity of the first battery.
It will be appreciated that the scenarios in which the terminal device connects to the battery include a first scenario in which the terminal device connects to the same battery and the battery capacity is not attenuated relative to the previous charge calibration, a second scenario in which the terminal device connects to the same battery but the battery capacity is attenuated relative to the previous charge calibration, and a third scenario in which the terminal device replaces a new battery. The first capacity (for example, the full charge capacity of the battery learned by the electricity meter last time) can more accurately represent the current full charge capacity of the battery, the second capacity (for example, the preset full charge capacity of the first battery) can more accurately represent the current full charge capacity of the battery according to the third capacity (the total capacity accumulated in or discharged during the current charge and discharge process) can more accurately determine the current full charge capacity of the battery according to the second scenario, and the second capacity (for example, the preset full charge capacity of the first battery) can more accurately represent the current full charge capacity of the battery according to the third scenario. Therefore, the current full charge capacity of the first battery can be rapidly and accurately determined according to the three conditions, regardless of the scene.
For example, after determining the current full charge capacity of the first battery, the current full charge capacity update may be stored in a corresponding storage location in the fuel gauge. For example, the flash memory of the fuel gauge has an erasing function, and the flash memory has a memory partition a and a memory partition B, wherein the memory partition a can store the value of the first capacity, and the memory partition B can store the value of the second capacity. In one example, the value of the current full charge capacity (the old first capacity value is erased) may be written in storage partition a each time a new current full charge capacity is determined. In another example, after determining the new current full charge capacity each time, the current full charge capacity and the preset full charge capacity of the first battery may be compared to determine whether the battery capacity is attenuated. If so, the current full capacity value (the old first capacity value is erased) is written in the storage partition a. In such an example, the storage partition a may or may not contain data (e.g., battery capacity is not decayed). For convenience of subsequent verification, in the case of writing the value of the current full charge capacity into the storage sub-area a, a verification value corresponding to the current full charge capacity (which may be obtained by encoding the value of the current full charge capacity using various suitable data encoding methods) may be written into the storage sub-area a, and the verification value and the value of the current full charge capacity may be used as verification data for subsequent verification.
For example, after the current full charge capacity is determined, the current remaining capacity and the current remaining capacity (a percentage between the current remaining capacity and the current full charge capacity) may be updated according to the current full charge capacity, and the current remaining capacity may be displayed on a display screen of the terminal device as the current remaining capacity. In this way, the purpose of calibrating the electrical quantity can be achieved. At least in the charging and discharging process before the next updating, the current residual electric quantity can be rapidly and accurately determined according to the current full charge capacity, the charge electric quantity and the discharge electric quantity.
As described above, for some batteries with higher electrochemical stability, the effect of performing electric quantity learning by using the conventional static electric quantity calibration algorithm is poor, which is specifically that it is difficult to quickly learn the accurate electric quantity of the battery. In the method for learning battery power according to the first aspect of the embodiment of the present application, when the current data update condition is determined to be satisfied according to the charge/discharge data of the battery during the charge/discharge process of the battery of the terminal device, the current full charge capacity of the battery is rapidly and accurately determined according to at least one of the historical full charge capacity stored in the flash memory of the fuel gauge, the preset full charge capacity of the battery, and the total capacity charged or discharged during the charge/discharge process. On the one hand, the method and the device have the advantages that the charge and discharge data acquired by the electricity meter are more reliable and can more accurately reflect the change of the electric quantity of the battery in the charge and discharge process of the battery, so that whether the data updating condition is met at present or not can be accurately determined, the accuracy and the efficiency of electric quantity learning can be improved, on the other hand, various possible scenes of the battery connected with the terminal equipment in the electric quantity learning process are fully considered, under the condition that the data updating condition is met at present is determined, the full charge capacity of the battery in the scene can be rapidly and accurately determined according to three different capacitance values corresponding to the scenes, and therefore the accuracy and the efficiency of electric quantity learning of the electricity meter can be improved, the applicability and the flexibility of the scheme can be improved, and the user experience is better.
In one implementation manner, before step S110, the method for determining the battery power according to the embodiment of the present application further includes the following steps:
Step S101, a first battery curve parameter corresponding to a first battery is determined in response to a starting instruction;
Step S102, if the first battery curve parameter is different from the second battery curve parameter stored in the fuel gauge, updating the first battery curve parameter into the fuel gauge so that the fuel gauge can determine the initial electric quantity of the first battery according to the first battery curve parameter;
Step S103, the first capacity stored in the flash memory of the fuel gauge is cleared.
As shown in fig. 2, the terminal device in the embodiment of the present application may include a CPU, a battery, and a fuel gauge chip. Wherein communication between the fuel gauge chip and the CPU may be via an I2C bus. Step S101 and step S102 may be performed by the CPU of the terminal device. Specifically, when the terminal device receives the startup instruction each time, the CPU may search and determine the first battery curve parameter corresponding to the first battery according to the identification information such as the model number of the first battery connected currently. As previously described, the battery curve parameter of each battery may be a data table of standard parameters related to the charge of each battery, which may be established by the fuel gauge manufacturer from pre-measured real data of different brands and different models of batteries. The second battery curve parameter may be a battery curve parameter of a battery (e.g., referred to as a second battery) connected with the last time the terminal device was powered on, which is stored in a flash memory of the electricity meter. Then, it may be determined whether the first battery curve parameter and the second curve parameter are the same. For example, a cumulative check (checksum) and algorithm may be employed to determine whether the first and second battery curve parameters are the same. The accumulated checksum algorithm is a simple error detection method that obtains a checksum value by summing each byte in the data. Specifically, the CPU may first calculate a checksum value of the battery curve parameter of the first battery, and then send a checksum command for obtaining the second battery curve parameter through the I2C bus, to obtain the checksum value of the second battery curve parameter stored in the flash memory of the fuel gauge chip. Comparing the two checksum values, if the two checksum values are not equal, first communicating with the fuel gauge chip via the I2C bus of the cpu, and updating the first battery curve parameter into the fuel gauge. Then, a reset command is sent to the fuel gauge, informing the fuel gauge chip of the reset. Then, the initialization of the fuel gauge is completed inside the fuel gauge chip. Specifically, during the electricity meter initialization process, the electricity meter may accurately determine the initial electricity amount of the first battery according to the updated first battery curve parameter. Therefore, in the charging and discharging process after the initialization is completed, the electric quantity of the battery can be rapidly estimated according to the initial electric quantity at the moment when the data updating condition is not met. That is, in this example, if the first battery curve parameter is different from the second battery curve parameter (the two checksum values are different), it may be stated that the first battery currently connected to the terminal device and the second battery connected last time are different batteries, and updating the battery curve parameter of the current first battery into the electricity meter may enable the initial electricity quantity of the battery determined by the electricity meter in the initialization process to be more accurate. And if the first battery curve parameter is the same as the second battery curve parameter, step S102 and step S103 may not be performed.
In the embodiment of the application, if the first battery curve parameter is determined to be different from the second battery curve parameter, the first capacity stored in the flash memory of the fuel gauge is cleared. It can be understood that the first battery curve parameter is different from the second battery curve parameter, which indicates that the terminal equipment replaces another battery, and clears the full charge capacity of other batteries stored in the flash memory, so that data errors can be prevented, and the accuracy of electric quantity learning is improved.
In the above scheme, before receiving the start-up instruction, the terminal device determines the battery curve parameter corresponding to the current battery, compares the battery curve parameter with the battery curve parameter stored in the fuel gauge, and if the battery curve parameter and the battery curve parameter are inconsistent, updates the battery curve parameter in the fuel gauge, and clears the first capacity stored in the flash memory of the fuel gauge. The scheme enables the electricity meter to accurately determine the initial electricity quantity of the current battery according to the updated battery curve parameters. The adaptability enables the electricity meter to be better suitable for battery replacement, and accuracy of electricity monitoring is improved. And in the event that it is determined that the battery curve parameters are inconsistent, the data stored in the flash memory of the fuel gauge regarding the full charge capacity of the last connected battery is also cleared. By purging the old full charge capacity data, the use of mismatched battery parameters for power calculations may be reduced. The old data are cleared, so that the fuel gauge can learn again according to the new parameters of the current battery and adapt to the replacement of the pluggable battery, confusion of the parameters of the new battery and the old battery can be prevented, and the data accuracy of the fuel gauge and the effectiveness of battery health management are improved. In general, through the scheme, the electricity meter can use correct battery parameters in each learning process, so that the accuracy of electricity monitoring is further improved, the battery capacity is optimized, the robustness of the system is enhanced, and the user experience is improved.
In one embodiment, before determining the current full charge capacity of the first battery in step S120, the method for determining the battery power according to the embodiment of the present application further includes the following step S104 and/or step S105.
Step S104, in the charging process, if the electric quantity of the first battery is determined to be full according to the charging data, the current meeting of the data updating condition is determined.
In the embodiment of the application, various suitable methods can be adopted to judge whether the electric quantity of the first battery is full according to the charging data. In one example, during charging, the analog-to-digital converter of the fuel gauge may collect the charging voltage and charging current of the first battery at a preset frequency (e.g., 1 millisecond/time), and determine in real-time whether the charging voltage and charging current collected within the current first time window (e.g., 10 seconds, 20 seconds) both meet a preset full charge condition. The preset full charge condition can be set arbitrarily according to actual requirements. For example, the preset full charge condition comprises that the charging voltage collected in the current first time window is always larger than the charging cut-off voltage, and the charging current is always larger than the minimum charging current and smaller than the charging cut-off current. If the charging voltage and the charging current collected in the current first time window are determined to meet the preset full charge condition, the electric quantity of the first battery can be determined to be full, namely the current condition for meeting the data update is determined.
Step S105, during the discharging, if it is determined from the discharging data that the electric quantity of the first battery has been discharged, it is determined that the data update condition is currently satisfied.
In the embodiment of the application, various suitable methods can be adopted to judge whether the electric quantity of the first battery is exhausted according to the discharge data. Similarly to the above step S104, during the discharging process, the analog-to-digital converter of the fuel gauge may collect the discharge voltage of the first battery at a preset frequency and determine in real time whether the discharge voltages collected within the current second time window (e.g., 40 seconds, 60 seconds) all satisfy the preset emptying condition. The preset emptying conditions can be set arbitrarily according to actual requirements. For example, the preset emptying condition comprises that the discharge voltage collected in the current second time window is always smaller than the charge zero voltage (the voltage of the battery with the electric quantity of 0%). If the discharge voltages collected in the current second time window are determined to meet the preset emptying conditions, the fact that the electric quantity of the first battery is emptied can be determined, namely that the data updating conditions are met currently is determined.
It will be appreciated that the charge and discharge data of the battery may be used to more accurately monitor the state of charge or discharge of the battery, and that updating the battery charge data each time the battery is charged or discharged may improve the accuracy of the charge data because the charge of the battery in these states is relatively easier to measure and determine. And when the charging and discharging period is finished, the state of the battery is relatively stable, and updating the electric quantity data is helpful for calibrating the state of the battery, so that errors caused by aging of the battery or change of using conditions are reduced. If the charge data is updated continuously during battery use, large errors may accumulate due to small measurement errors. Updating at the end of the charge-discharge cycle may mitigate this accumulated error. In the fully charged and discharged state of the battery, the chemical state of the battery is relatively consistent, which simplifies the charge calculation model, making the charge prediction more reliable. In general, the battery data is updated when the battery is full or empty, so that the accuracy of monitoring the electric quantity can be improved, the use of the battery is optimized, the user experience is enhanced, and the effectiveness of battery health management and intelligent device scheduling can be improved.
In one embodiment, after determining the current full charge capacity of the first battery in step S120, the method for determining the battery level according to the embodiment of the present application further includes the following step S131 and/or step S132.
Step S131, in the case that it is determined that the electric quantity of the first battery is full according to the charging data, determining and updating the current remaining capacity and/or the current remaining electric quantity of the first battery, wherein the current remaining capacity is equal to the current full charging capacity, and the current remaining electric quantity is equal to the full charging capacity.
In the embodiment of the application, the electricity meter can determine the current residual capacity and/or the current residual capacity according to the current full charge capacity learned each time, and can update and store the current residual capacity and/or the current residual capacity in the memory. For example, in the charging process, at a plurality of times when the full charge condition is not reached, the remaining capacity and the remaining capacity of the first battery may be estimated according to the preset full charge capacity of the first battery, the initial electric quantity determined in the initializing process, and the charging and discharging data, and updated in the memory of the fuel gauge. In this step, in the case where it is determined that the electric quantity of the first battery is full, not only the current full charge capacity of the first battery may be determined, but also the first capacity may be updated according to the current full charge capacity. For example, the value of the original first capacity stored in the memory partition a of the flash memory is updated to the value of the current full charge capacity. And the value of the current full charge capacity can be stored in the memory as the current residual capacity. Similarly, a full charge amount such as "100%" may be stored in the memory as the current remaining amount. The terminal device may include a display screen, and the current remaining power may be displayed using the display screen. For example, when the electric quantity of the first battery is full, 100% of information of the electric quantity can be displayed on the interface displayed on the display screen, or a prompt message of "charging is completed, please remove the power supply in time" can also be displayed.
In step S132, in the case that it is determined that the electric quantity of the first battery has been emptied according to the discharge data, the current remaining capacity and/or the current remaining electric quantity of the first battery are determined and updated, wherein the current remaining capacity is equal to the empty capacity, and the current remaining electric quantity is equal to the empty electric quantity.
Similar to the scheme of step S131 described above, in this step, the value of the original first capacity stored in the memory partition a may be updated to the value of the current full charge capacity upon determining that the electric quantity of the first battery has been emptied. And may store a value of the current capacity of the fuel gauge (e.g., store "0") in the memory of the fuel gauge as the current remaining capacity, and store a capacity of the fuel gauge such as "0%" in the memory of the fuel gauge as the current remaining capacity.
By updating the charge data when the battery is fully charged or discharged, the accuracy of the charge display can be improved. At these particular moments, the state of charge of the battery is most definite and thus more accurate charge information can be provided. Updating data at both extremes of battery charge (full and empty), simplifies the charge calculation algorithm and reduces errors that may accumulate during battery use due to continuous monitoring. In addition, the accurate electric quantity display can improve the trust degree of the user on the electric quantity indication of the equipment, so that the user experience is improved. The scheme updates data at two extreme states of battery power, so that battery management is more effective and accurate, battery use efficiency is improved, battery life is prolonged, and safety and reliability of equipment are enhanced
In one embodiment, step S120 determines the current full charge capacity of the first battery according to at least one of the first capacity, the second capacity, and the third capacity, including:
In step S120a, in the case that the data updating condition is determined to be currently satisfied, the current full charge capacity is determined according to the electric quantity learning information of the electric quantity meter and one of the first capacity, the second capacity or the third capacity, wherein the electric quantity learning information comprises first information indicating that the first learning process has not been completed by the electric quantity meter for the first battery or second information indicating that the first learning process has been completed by the electric quantity meter for the first battery.
In the embodiment of the application, when the current meeting of the data updating condition is determined, the current electric quantity learning information of the electric quantity meter can be acquired. The electricity amount learning information may be electricity amount learning information indicating that the electricity amount meter has performed for the currently connected first battery, and may be information indicating whether the electricity amount meter has once calibrated the electricity amount of the current first battery, that is, information indicating whether the electricity amount meter has completed the first learning process for the first battery. In the embodiment of the application, the electric quantity learning information may be first information indicating that the electric quantity meter has not completed the first learning process for the first battery, or may be second information indicating that the electric quantity meter has completed the first learning process for the first battery. For example, data of the electric quantity learning information, such as a first learning completion flag, is stored in the memory of the electric quantity meter. For example, a character string such as "0" or "1", "True" or "Fa/se" is stored in the memory. For example, the number of strings "True" is first information, and "Fa/se" is second information. For example, in the above example in which the data update condition is a condition that the first battery has been full or the first battery has been empty, if the terminal device is connected to the first battery for a while and the first battery has been full or empty, and the electricity meter updates the current full charge capacity when the electricity meter is full or empty, the electricity meter's electricity amount learning information is second information, such as "True" stored in the memory, and if the terminal device is connected to the first battery, the electricity meter's electricity amount learning information is first information, such as "Fa/se" stored in the memory.
In the embodiment of the application, when the current data updating condition is determined to be met, one of the first capacity, the second capacity or the third capacity can be screened according to the electric quantity learning information of the current electric quantity meter to be used as the basis for determining the current full charge capacity. For example, different power learning information corresponds to different screening results. After the screening result is obtained, the selected one can be directly used as the current full charge capacity. Or after the screening result is obtained, the current full charge capacity can be further calculated.
It will be appreciated that the integrity of each charge-discharge learning process of the fuel gauge may be more accurately determined considering whether the fuel gauge has completed the first learning process for the current battery. For example, in the above example that the data update condition is a condition that the electric quantity of the first battery is full or the electric quantity of the first battery is empty, whether the current charging process or discharging process is complete or not can be accurately judged according to the electric quantity learning information of the electric quantity meter, so that a more accurate reference basis can be provided for subsequently determining the current full charge capacity of the battery, and the electric quantity meter can learn the accurate electric quantity more quickly and accurately.
In the scheme, whether the current full charge capacity of the battery is determined according to one of the first capacity, the second capacity or the third capacity is combined with the condition that whether the current battery has completed the first learning process or not by the fuel gauge, so that the accuracy and reliability of fuel monitoring can be remarkably improved, the use of the battery is optimized, the service life of the battery is prolonged, and the user experience is improved.
In one embodiment, step S120a determines the current full charge capacity from the charge learning information of the fuel gauge and one of the first capacity, the second capacity, or the third capacity, including steps S120a.1 and S120a.2 below.
In step s120a.1, if the electric quantity learning information of the electric quantity meter is the first information, the current full charge capacity is determined according to the first capacity or the second capacity.
The following description will take, as an example, a data update condition as a condition that the first battery has been fully charged or a condition that the first battery has been discharged.
For example, in the first battery charging process, if it is detected that the electric quantity of the battery has been fully charged, a first learning completion flag of the electric quantity meter stored in the memory of the electric quantity meter may be read, and if it is "Fa/se", it may be determined that the electric quantity meter does not complete the first learning process for the currently connected first battery. In other words, the amount of power that has not been fully charged or discharged after the terminal device connects to the first battery indicates that the current charging process is likely not a complete charging process (indicating that the first battery may be a new battery that has not been used, or that the first battery has been unplugged and plugged in), and the amount of power accumulated at this time is likely to be a partial capacity of the battery. Thus, the current full charge capacity may be determined based on the first capacity (e.g., the full charge capacity of the battery last learned by the fuel gauge, corresponding to a scenario in which the first battery was unplugged and then installed) or the second capacity (a preset full charge capacity determined based on the battery profile parameters of the first battery, corresponding to a scenario in which the first battery is a new battery).
In the case where the electric quantity learning information of the electric quantity meter is the second information, the current full charge capacity is determined according to one of the first capacity, the second capacity, or the third capacity, step s120 a.2.
For example, in the first battery charging process, if it is detected that the electric quantity of the battery has been full, a first learning completion flag of the electric quantity meter stored in the memory of the electric quantity meter may be read, and if "True" it may be determined that the electric quantity meter has completed the first learning process for the first battery currently connected, or that the first learning process has been completed for other batteries of the same model as the first battery currently connected. In general, the charging rule of "full-empty-full" is maintained at the terminal device, so that it is indicated that the electric quantity of the first battery is emptied before the terminal device is charged at this time, which means that the current charging process may be a complete charging process. In this case, the current full charge capacity may be determined according to one of the first capacity, the second capacity, or the third capacity.
In one embodiment, the current full charge capacity may be determined directly from the third capacity. For example, the third capacity is directly taken as the current full charge capacity. If the electric quantity of the battery is detected to be full in the charging process, the accumulated charged electric quantity in the current charging process can be used as the current full charge capacity. For another example, it may be determined whether the open circuit voltage of the battery is an open circuit voltage at 95% of the amount of electricity in the correspondence table during the charging process. If so, it may be determined that the data update condition is currently satisfied, and then a calculation may be performed on the third capacity (e.g., calculating a quotient of the third capacity and 85%) to obtain a current full charge capacity based on the fuel gauge having completed the first learning process.
In another embodiment, a plurality of suitable screening conditions may be employed to further select one of the first capacity, the second capacity, and the third capacity to determine the current full charge capacity. For example, it may be further determined whether the first battery satisfies a fade condition, i.e., whether the battery capacity is decayed. If so, the current full charge capacity may be determined based on the third capacity (e.g., in the case where the battery reaches a full charge condition, the fuel gauge completes the first charge learning process, and the battery capacity decays, the accumulated charged capacity is taken as the current full charge capacity). If not, the current full charge capacity may be determined according to the second capacity (e.g., when the battery reaches a full charge condition, the fuel gauge completes the first power learning process, and the battery capacity is not attenuated, the preset full charge capacity of the first battery is taken as the current full charge capacity). Therefore, the full charge capacity of the battery can be updated in time under the condition of battery capacity attenuation, the accuracy of electric quantity learning calibration is improved, the influence of data errors can be fully considered, and unnecessary updating calculation is reduced. In still another example, the third capacity and the first capacity may be compared in a case where it is determined that the first battery satisfies the decay condition according to the above-described method and a value of the first capacity is stored in the flash memory of the fuel gauge, the first capacity may be regarded as the current full charge capacity if the difference therebetween is not large, the third capacity may be regarded as the current full charge capacity if the difference therebetween is large, and the first capacity may be updated according to the third capacity. Therefore, the full charge capacity of the battery can be updated in time under the condition that the capacity of the battery is further attenuated, the accuracy of electric quantity learning and calibration is improved, the influence of data errors can be fully considered, and unnecessary updating calculation is reduced.
In the scheme, different scenes of whether the electricity meter finishes the first learning process for the first battery are considered, and different capacity reference bases are adopted correspondingly, so that the current full charge capacity is determined rapidly and accurately. Thereby further improving the accuracy and efficiency of electric quantity monitoring and learning.
In one embodiment, in the case that the electric quantity learning information of the electric quantity meter is the first information, the step s120a.1 of determining the current full charge capacity according to the first capacity or the second capacity includes the following steps:
S120a.11, reading check data stored in a flash memory of the fuel gauge, wherein the check data comprises a numerical value of a first capacity and a first check value determined according to the first capacity;
step S120a.12, determining that the current full charge capacity is equal to the first capacity under the condition that the first check value is equal to the second check value corresponding to the first capacity;
In step s120a.13, in case the first check value and the second check value are not equal, or in case no check data is read, it is determined that the current full charge capacity is equal to the second capacity.
As described above, when the fuel gauge learns a new current full charge amount each time, the value of the current full charge amount (the old first capacity value is erased) may be written in the corresponding memory partition (for example, the memory partition a), and for convenience of subsequent verification, the verification value of the current full charge amount (the verification value may be obtained by encoding the value of the current full charge amount using various suitable data encoding methods) may be written in the memory partition a, and the verification value and the value of the current full charge amount may be used as verification data. That is, in the case where the fuel gauge of the terminal device once calibrates the full charge capacity for the last connected battery or the currently connected battery, the flash memory of the fuel gauge may store therein the value of the full charge capacity calibrated at that time, that is, the value of the historical full charge capacity, and also store a first check value determined according to the value.
In one specific example, during the first battery charging process, if it is detected that the electric quantity of the battery has been full, a first learning completion flag of the electric quantity meter stored in the memory of the electric quantity meter may be read, and if it is "Fa/se", it may be determined that the electric quantity meter does not complete the first learning process for the first battery currently connected. Then, the value of the historical full charge capacity and the first check value stored in the memory partition a of the flash memory of the fuel gauge may be read. And a second check value corresponding to the value of the historical full charge capacity may be determined according to a preset check value determination method (for example, a preset data encoding method). The first check value and the second check value may then be compared and if they are equal, it may be determined that the current full charge capacity is equal to the first capacity. Conversely, if the two are not equal, or the value of the historical full charge capacity and the first check value are not read from the storage partition a (for example, in step S103, these data are cleared according to the case where the battery curve parameter of the current first battery is different from the battery curve parameter of the battery to which the terminal device was last connected), it may be determined that the current full charge capacity is equal to the second capacity.
It will be appreciated that in the above example, if the value of the historical full charge capacity of the battery learned last time by the fuel gauge and the first check value can be read from the storage partition a, it may be explained to some extent that the battery connected when the first battery and the fuel gauge were last calibrated for full charge capacity is the same battery, and therefore the full charge capacity obtained by the last calibration may be used as the current full charge capacity, so that the fuel gauge may quickly and accurately learn the full charge capacity of the battery even after the same battery is plugged and powered up again. If the value of the historical full charge of the battery learned last time by the fuel gauge and the first check value cannot be read from the storage partition a, it may be stated that the battery connected when the fuel gauge was last calibrated for full charge is a different battery. In this case, the preset full charge capacity determined according to the battery curve parameter of the first battery may be taken as the current full charge capacity of the first battery. In this way, the fuel gauge can also quickly and accurately learn the full charge capacity of the current battery in the event that the terminal device replaces a different battery. Further, if the value of the historical full charge capacity of the battery and the first check value that the fuel gauge last learned can be read from the memory partition a, but the difference between the first check value and the second check value corresponding to the value of the historical full charge capacity is large, it may be that the stored data is damaged, and the value of the historical full charge capacity stored in the memory partition a may be problematic. In this case, the preset full charge capacity of the first battery may also be used as the current full charge capacity of the first battery, so that accuracy of electric quantity learning may be improved.
The method for calibrating the full charge capacity of the first battery fully considers various possible scenes, the determined full charge capacity is more accurate, and the calculated amount is smaller, so that the accuracy and the efficiency of electric quantity learning of the fuel gauge are further improved.
In one implementation manner, after step S110, the method for learning battery power provided in the embodiment of the present application further includes the following steps:
step S111 of determining whether the first battery reaches the decay condition according to the first difference between the third capacity and the second capacity and the first difference threshold value, in the case where it is determined that the data update condition is currently satisfied and the electric quantity learning information of the electric quantity meter is the second information;
Step S112, if so, updating the check data stored in the flash memory of the fuel gauge according to the value of the third capacity and the third check value corresponding to the third capacity under the condition that the second difference between the third capacity and the first capacity is larger than or equal to the second difference threshold;
step S113, if not, the verification data stored in the flash memory of the fuel gauge is cleared.
In a specific example, the first difference may be an absolute value of a first capacity difference between the third capacity and the second capacity, and the first difference threshold may be a first capacity difference threshold (which may be set according to actual requirements, e.g., the first capacity difference threshold is 5% of the second capacity). It may be determined that the first battery reaches a damping condition, i.e., a first battery capacity damping, in a case where an absolute value of a first capacity difference between the third capacity and the second capacity is greater than a first capacity difference threshold. Otherwise, it may be determined that the first battery has not reached the fade condition, i.e., the battery capacity has not decayed relative to the last calibration.
For example, in the case where it is determined that the first battery does not reach the fade condition, the current full charge capacity may be determined according to the second capacity (preset full charge capacity of the first battery). For example, in the case where the battery reaches the full charge condition, the electricity meter completes the first electricity amount learning process, and the battery capacity is not attenuated, the preset full charge capacity of the first battery is taken as the current full charge capacity. During at least a period of time thereafter, the charge of the battery may be estimated from the preset full charge capacity. Thus, taking the effect of the data error into full consideration, unnecessary update calculations can be reduced. In addition, in the embodiment of the present application, if it is determined that the first battery does not reach the decay condition, if the value of the first capacity is stored in the flash memory of the fuel gauge (for example, after the first battery of the same model is replaced, full charge capacity data of the capacity-decayed battery connected last time is stored in the fuel gauge), the value may be cleared, so as to reduce interference caused by the data on learning of the fuel gauge.
For example, in the event that it is determined that the first battery has reached a fade condition, the value of the first capacity may be read first (e.g., the check data in memory partition a is read). If no data is read, the third capacity may be directly taken as the current full charge capacity. If the value of the first capacity is read, the first capacity and the third capacity may be further compared, and a current full charge capacity may be determined based on one of the two. Specifically, a second capacity difference between the first capacity and the third capacity may be calculated. If the absolute value of the second capacity difference is greater than the second capacity difference threshold (e.g., 5% of the third capacity), it may be determined that the capacity of the first battery is further attenuated. In this case, the third capacity may be determined as the current full charge capacity. The value of the third capacity and the corresponding check value (third check value) may be written into the electric quantity learning storage area in the flash memory of the electric quantity meter. For example, existing data in memory partition a is erased and the value of the third capacity and the third check value are written to memory partition a. In this way, the full charge capacity of the battery can be accurately calibrated, and the charge of the battery can be determined from the third capacity stored in the storage partition a for at least a subsequent period of time. And if the absolute value of the second capacity difference is less than or equal to the second capacity difference threshold, it may be indicated that the capacity of the first battery is not attenuated or attenuated less relative to the time point at which the first capacity was last updated. Thus, the first capacity may be regarded as the current full charge capacity. And can keep the existing data in the current storage partition a unchanged. Thus, frequent data updating caused by data calculation errors can be reduced, and the calculation amount can be reduced.
In one implementation manner, after step S110, the method for determining the battery power provided in the embodiment of the present application further includes the following step S114 and/or step S115.
Step S114 of updating the electricity amount learning information of the electricity amount meter to the second information in the case where it is determined that the data updating condition is currently satisfied and the electricity amount learning information of the electricity amount meter is the first information.
For example, in the case where it is determined that the electric quantity is full and the first learning completion flag of the electric quantity meter stored in the memory of the electric quantity meter is "Fa/se" during the charging, the current full charge capacity may be determined from the first capacity or the second capacity, and the first learning completion flag of the electric quantity meter stored in the memory may be updated to "True". In step S115, in the case where it is determined that the terminal device is disconnected from the first battery, the electric quantity learning information of the electric quantity meter is updated to the first information.
For example, in the case where the first battery is disconnected from the terminal device, the first learning completion flag of the fuel gauge stored in the memory is updated to "Fa/se".
According to the scheme, the electric quantity learning information can accurately reflect the learning condition of the electric quantity of the current connected battery by the electric quantity meter, so that the accuracy of electric quantity learning of the electric quantity meter can be improved.
A method for determining a battery power according to another embodiment of the present application will be described with reference to fig. 3 and 4. First, in the case where the terminal device removes the last battery (e.g., the lithium iron phosphate battery is unplugged), the fuel gauge learning flag is set to 0. Then, after the terminal device installs the battery and starts up, the CPU recognizes a first battery curve parameter corresponding to the current battery. And determines whether an update is required. If yes, updating the battery curve parameter into the fuel gauge, so that the fuel gauge performs initialization and power learning according to the updated battery curve parameter, and clears the full charge capacity data (such as the value of the first capacity and the corresponding check value) in the flash memory. Then, the electricity meter initialization is performed to obtain an initial amount of electricity.
In the process of charging and discharging the battery, the electricity meter performs electricity quantity learning. In the discharging process, the electricity meter collects battery discharging data and judges whether an electricity quantity emptying condition is reached according to the discharging data. And when the battery voltage is lower than the zero voltage (the voltage of the battery power is 0%) in the zero time window, judging that the battery power is empty. If not, continuing to collect and judge. If the battery power is empty, a first learning completion flag of the fuel gauge is acquired, and if the first learning completion flag is "0", the current full charge capacity can be determined according to the full charge capacity (first capacity) stored in the flash memory of the fuel gauge or the full charge capacity (preset full charge capacity) in the battery curve parameter. And updates the current full charge capacity in the fuel gauge. The method comprises the steps of reading full charge capacity (first capacity) and corresponding check values from a flash memory of the fuel gauge, checking read data, updating the full charge capacity stored in the flash memory to the full charge capacity of the fuel gauge if the check is passed, and updating the full charge capacity in battery curve parameters to the full charge capacity of the fuel gauge if the check is not passed. And the first learning completion flag may be updated to "1". If the battery level has been exhausted and the first learning completion flag is "1", it is determined that the current full charge capacity is equal to the capacity (third capacity) discharged by the accumulated discharge. Then, a full charge capacity deviation between the discharged capacity and the full charge capacity in the battery curve parameters can be calculated, then, whether the battery capacity is attenuated or not can be determined according to the full charge capacity deviation, and the full charge capacity and the check value in the flash memory can be erased according to the attenuation condition. Specifically, if the deviation value is smaller than the battery decay deviation threshold, the full charge capacity data stored in the flash memory of the fuel gauge is cleared (the deviation is smaller than the decay deviation threshold, which indicates that the battery is not decayed, the data stored in the flash memory is cleared, and the full charge capacity in the battery curve parameters is directly used for the first time in learning. If the full charge capacity deviation value is greater than a battery decay deviation threshold (the decay deviation threshold is, for example, one of the battery curve parameters), then it is further determined whether the capacity of the battery is further decayed. Specifically, the difference between the discharge capacity (third capacity) and the full charge capacity (first capacity) stored in the flash memory may be compared with a difference threshold. If the difference is greater than the difference threshold, it may be determined that the performance of the battery is further degraded. And the check value can be calculated from the current full capacity. Further, the value of the current full charge capacity may be written to the learned data partition of the fuel gauge flash memory along with the check value. The electricity meter remaining capacity may also be updated to 0 and the current remaining capacity may be updated to 0%.
And in the battery charging process, collecting battery charging data, and judging whether a full charge condition is reached according to the charging data. Specifically, the battery charging voltage and charging current are collected, and when the full charge time window continuously meets the following conditions that the battery voltage is larger than the charging cut-off voltage (1), and the charging current is smaller than the cut-off current and larger than the minimum charging current (2), the electric quantity of the battery is judged to be full. Otherwise, continuing to collect and judge. If the battery capacity is full, a first learning completion flag of the fuel gauge is acquired, and if the first learning completion flag is "0", the current full charge capacity can be determined according to the full charge capacity (first capacity) stored in the flash memory of the fuel gauge or the full charge capacity (preset full charge capacity) in the battery curve parameter. And updates the current full charge capacity in the fuel gauge. The method comprises the steps of reading full charge capacity (first capacity) and corresponding check values from a flash memory of the fuel gauge, checking read data, updating the full charge capacity stored in the flash memory to the full charge capacity of the fuel gauge if the check is passed, and updating the full charge capacity in battery curve parameters to the full charge capacity of the fuel gauge if the check is not passed. And the first learning completion flag may be updated to "1". If the battery level has been exhausted and the first learning completion flag is "1", it is determined that the current full charge capacity is equal to the capacity charged by the accumulated charge (third capacity). Then, a full charge capacity deviation between the charged capacity and the full charge capacity in the battery curve parameters can be calculated. Whether the battery capacity is attenuated or not can be determined according to the deviation of the full charge capacity, and the full charge capacity and the check value in the flash memory are erased according to the attenuation condition. Specifically, if the deviation value is smaller than the battery decay deviation threshold, the full charge capacity data stored in the flash memory of the fuel gauge is cleared (the deviation is smaller than the decay deviation threshold, which indicates that the battery is not decayed, the data stored in the flash memory is cleared, and the full charge capacity in the battery curve parameters is directly used for the first time in learning. If the full charge capacity deviation value is greater than a battery decay deviation threshold (the decay deviation threshold is, for example, one of the battery curve parameters), then it is further determined whether the capacity of the battery is further decayed. Specifically, the difference between the amount of charge (third capacity) and the full charge capacity (first capacity) stored in the flash memory may be compared with a difference threshold. If the difference is greater than the difference threshold, it may be determined that the performance of the battery is further degraded. And the check value can be calculated from the current full capacity. Further, the value of the current full charge capacity may be written to the learned data partition of the fuel gauge flash memory along with the check value. The remaining capacity of the fuel gauge may also be updated to the current full charge capacity and the current remaining capacity may be updated to 100%.
In the scheme, in the learning process of the fuel gauge, if the battery is full or empty for the first time, the full charge capacity in the battery curve parameter can be updated to the fuel gauge, so that the fuel gauge can quickly learn to an accurate capacity. And, the electric quantity with large error of the initial initialization calculation is calibrated once. Strict control of the emptying and full-filling conditions ensures accurate full-filling and emptying judgment under various use scenes. Various algorithm parameters (zero voltage, zero time window, battery cut-off voltage, battery cut-off current, minimum battery charging current, full charge time window and the like) are controlled through the battery curve parameters, so that the flexibility of an algorithm is ensured. And a static electricity quantity calibration algorithm in the traditional electricity quantity learning algorithm is removed, so that errors caused by deviation of the collected voltage of the static electricity quantity algorithm are solved. And, the learning calibration of full charge and empty at every time guarantees the accuracy of the electric quantity when the battery is attenuated due to battery aging.
A second aspect of the embodiments of the present application provides a device for determining a battery power. As shown in fig. 5, the battery level determining apparatus 500 includes:
The obtaining module 510 is configured to obtain charging and discharging data during a charging and discharging process of a first battery currently connected to the terminal device, where the charging and discharging data includes charging data of the first battery during a charging process and/or discharging data during a discharging process;
The first determining module 520 is configured to determine, when it is determined that the data update condition is currently satisfied according to the charge/discharge data, a current full charge capacity of the first battery according to at least one of a first capacity, a second capacity, and a third capacity, where the first capacity is a historical full charge capacity stored in a flash memory of a fuel gauge of the terminal device, the second capacity is a preset full charge capacity of the first battery, and the third capacity is equal to a total capacity charged during a charging process or a total capacity discharged during a discharging process.
In one embodiment, the first determining module 520 includes:
And a first determining sub-module for determining a current full charge capacity according to the electric quantity learning information of the electric quantity meter and one of the first capacity, the second capacity or the third capacity in the case that the data updating condition is determined to be met currently, wherein the electric quantity learning information comprises first information indicating that the electric quantity meter has not completed a first learning process for the first battery or second information indicating that the electric quantity meter has completed a first learning process for the first battery.
In one embodiment, a first determination sub-module includes:
A first determining unit configured to determine a current full charge capacity according to the first capacity or the second capacity, in a case where the electric quantity learning information of the electric quantity meter is the first information;
And a second determination unit configured to determine a current full charge capacity according to one of the first capacity, the second capacity, or the third capacity, in a case where the electric quantity learning information of the electric quantity meter is the second information.
In one embodiment, the first determining unit includes:
The reading subunit is used for reading the check data stored in the flash memory of the fuel gauge, wherein the check data comprises a numerical value of a first capacity and a first check value determined according to the first capacity;
The first determining subunit is used for determining that the current full charge capacity is equal to the first capacity under the condition that the first check value is equal to the second check value corresponding to the first capacity;
and the second determining subunit is used for determining that the current full charge capacity is equal to the second capacity in the case that the first check value and the second check value are not equal or in the case that the check data are not read.
In one embodiment, the battery power determination apparatus 500 further includes:
The attenuation judging module is used for determining whether the first battery reaches the attenuation condition according to the first difference between the third capacity and the second capacity and the first difference threshold value under the condition that the data updating condition is met currently and the electric quantity learning information of the electric quantity meter is the second information;
The check data updating module is used for updating the check data stored in the flash memory of the fuel gauge according to the value of the third capacity and the third check value corresponding to the third capacity if the second difference between the third capacity and the first capacity is larger than or equal to the second difference threshold value;
and the first clearing module is used for clearing the check data stored in the flash memory of the fuel gauge if not.
In one embodiment, the battery power determination apparatus 500 further includes:
a first updating module for updating the electric quantity learning information of the electric quantity meter to the second information in the case that the data updating condition is satisfied and the electric quantity learning information of the electric quantity meter is determined to be the first information, and/or
And a second updating module for updating the electric quantity learning information of the electric quantity meter to the first information in the case that the terminal device is determined to be disconnected from the first battery.
In one embodiment, the battery power determination apparatus 500 further includes:
a full charge determination module for determining that the data update condition is currently satisfied if the charge of the first battery is determined to be full according to the charge data during the charging process, and/or
And the emptying judgment module is used for determining that the data updating condition is currently met if the electric quantity of the first battery is determined to be emptied according to the discharging data in the discharging process.
In one embodiment, the battery power determination apparatus 500 further includes:
A first electric quantity updating module for determining and updating the current residual capacity and/or the current residual electric quantity of the first battery under the condition that the electric quantity of the first battery is determined to be full according to the charging data, wherein the current residual capacity is equal to the current full charging capacity, the current residual electric quantity is equal to the full charging quantity, and/or
And the second electric quantity updating module is used for determining and updating the current residual capacity and/or the current residual electric quantity of the first battery under the condition that the electric quantity of the first battery is determined to be emptied according to the discharge data, wherein the current residual capacity is equal to the emptying capacity, and the current residual electric quantity is equal to the emptying electric quantity.
In one embodiment, the battery power determination apparatus 500 further includes:
the second determining module is used for responding to the starting instruction and determining a first battery curve parameter corresponding to the first battery;
A third updating module, configured to update the first battery curve parameter to the fuel gauge if the first battery curve parameter is different from the second battery curve parameter stored in the fuel gauge, so that the fuel gauge determines an initial power of the first battery according to the first battery curve parameter;
And the second clearing module is used for clearing the first capacity stored in the flash memory of the fuel gauge.
The embodiment of the application also provides terminal equipment. As shown in fig. 6, the terminal device 600 includes at least one processor 610, at least one memory 620, and a computer program 630 stored in the memory 620 and executable on the at least one processor 610, the steps of the above-described method for determining battery power being implemented by the processor 610 when the computer program 630 is executed. Specifically, the terminal device 600 may include an electricity meter including the above-described processor 610 and memory 620.
Fig. 6 is merely an example of a terminal device and does not constitute a limitation of the terminal device, and may comprise more components than shown, or may combine certain components, or may be different components. The Processor may be a central processing unit (Centra l Process ing Un it, CPU), which may also be other general purpose processors, digital signal processors (DIGITA L SIGNA L processors, DSPs), application Specific Integrated Circuits (ASICs), field programmable gate arrays (Fie ld-Programmab LE GATE ARRAY, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
It should be noted that, because the content of information interaction and execution process between the above devices/modules is based on the same concept as the method embodiment of the present application, specific functions and technical effects thereof may be referred to in the method embodiment section, and will not be described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional modules is illustrated, and in practical application, the above-described functional allocation may be performed by different functional modules according to needs, i.e. the internal structure of the apparatus is divided into different functional modules to perform all or part of the functions described above. The functional modules in the embodiment may be integrated in one processing module, or each module may exist alone physically, or two or more modules may be integrated in one module, where the integrated modules may be implemented in a form of hardware or a form of software functional modules. In addition, the specific names of the functional modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
The embodiment of the application also provides a computer readable storage medium, wherein a computer program is stored in the computer readable storage medium, and the steps in the method for determining the battery electric quantity can be realized when the computer program is executed by a processor.
The embodiment of the application provides a computer program product which enables a terminal device to realize the steps in the method for determining the battery power when the computer program product runs on the terminal device.
The foregoing embodiments are merely illustrative of the technical solutions of the present application, and not restrictive, and although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those skilled in the art that modifications may still be made to the technical solutions described in the foregoing embodiments or equivalent substitutions of some technical features thereof, and that such modifications or substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (10)

1.一种电池电量的确定方法,其特征在于,包括:1. A method for determining battery power, comprising: 在终端设备当前所连接的第一电池的充放电过程中,获取充放电数据,其中,所述充放电数据包括所述第一电池在充电过程中的充电数据和/或在放电过程中的放电数据;During the charging and discharging process of the first battery currently connected to the terminal device, acquiring charging and discharging data, wherein the charging and discharging data includes charging data of the first battery during the charging process and/or discharging data of the first battery during the discharging process; 在根据所述充放电数据确定当前满足数据更新条件的情况下,根据第一容量、第二容量、第三容量中的至少一者,确定所述第一电池的当前满充容量,其中,所述第一容量为所述终端设备的电量计的闪存中所存储的历史满充电容量,所述第二容量为所述第一电池的预设满充电容量,所述第三容量等于所述充电过程所充入的总电容量或所述放电过程所放出的总电容量。When it is determined that the data update condition is currently met based on the charge and discharge data, the current full charge capacity of the first battery is determined based on at least one of the first capacity, the second capacity, and the third capacity, wherein the first capacity is the historical full charge capacity stored in the flash memory of the power meter of the terminal device, the second capacity is the preset full charge capacity of the first battery, and the third capacity is equal to the total capacity charged during the charging process or the total capacity discharged during the discharging process. 2.如权利要求1所述的电池电量的确定方法,其特征在于,所述根据第一容量、第二容量、第三容量中的至少一者,确定所述第一电池的当前满充容量,包括:2. The method for determining battery power according to claim 1, wherein determining the current full charge capacity of the first battery according to at least one of the first capacity, the second capacity, and the third capacity comprises: 在确定当前满足数据更新条件的情况下,根据所述电量计的电量学习信息,以及所述第一容量、第二容量或第三容量中的一者,确定所述当前满充容量,其中所述电量学习信息包括:表示所述电量计针对所述第一电池尚未完成首次学习过程的第一信息或表示所述电量计针对所述第一电池已完成首次学习过程的第二信息。When it is determined that the data update conditions are currently met, the current full charge capacity is determined based on the power learning information of the power meter and one of the first capacity, the second capacity or the third capacity, wherein the power learning information includes: first information indicating that the power meter has not yet completed the first learning process for the first battery or second information indicating that the power meter has completed the first learning process for the first battery. 3.如权利要求2所述的电池电量的确定方法,其特征在于,所述根据所述电量计的电量学习信息,以及所述第一容量、第二容量或第三容量中的一者,确定所述当前满充容量,包括:3. The method for determining the battery power of claim 2, wherein determining the current full charge capacity according to the power learning information of the power meter and one of the first capacity, the second capacity or the third capacity comprises: 在所述电量计的电量学习信息为所述第一信息的情况下,根据所述第一容量或第二容量确定所述当前满充容量;When the electric quantity learning information of the electric quantity meter is the first information, determining the current full charge capacity according to the first capacity or the second capacity; 在所述电量计的电量学习信息为所述第二信息的情况下,根据所述第一容量、所述第二容量或第三容量中的一者确定所述当前满充容量。In a case where the power learning information of the power meter is the second information, the current full charge capacity is determined according to one of the first capacity, the second capacity, or a third capacity. 4.如权利要求3所述的电池电量的确定方法,其特征在于,所述在所述电量计的电量学习信息为所述第一信息的情况下,根据所述第一容量或第二容量确定所述当前满充容量,包括:4. The method for determining the battery power of claim 3, wherein when the power learning information of the power meter is the first information, determining the current full charge capacity according to the first capacity or the second capacity comprises: 读取所述电量计的闪存中所存储的校验数据,其中,所述校验数据包括:所述第一容量的数值和根据所述第一容量确定的第一校验值;Reading verification data stored in a flash memory of the electricity meter, wherein the verification data includes: a value of the first capacity and a first verification value determined according to the first capacity; 在所述第一校验值和所述第一容量对应的第二校验值相等的情况下,确定所述当前满充容量等于所述第一容量;When the first verification value is equal to a second verification value corresponding to the first capacity, determining that the current full charge capacity is equal to the first capacity; 在所述第一校验值和所述第二校验值不相等的情况下,或者,在未读取到所述校验数据的情况下,确定所述当前满充容量等于所述第二容量。When the first verification value and the second verification value are not equal, or when the verification data is not read, it is determined that the current full charge capacity is equal to the second capacity. 5.如权利要求4所述的电池电量的确定方法,其特征在于,所述方法还包括:5. The method for determining the battery power according to claim 4, characterized in that the method further comprises: 在确定当前满足数据更新条件并且所述电量计的电量学习信息为所述第二信息的情况下,根据所述第三容量和所述第二容量之间的第一差异和第一差异阈值,确定所述第一电池是否达到衰减条件;When it is determined that the data update condition is currently met and the power learning information of the power meter is the second information, determining whether the first battery reaches the attenuation condition according to a first difference between the third capacity and the second capacity and a first difference threshold; 若是,则在所述第三容量和所述第一容量之间的第二差异大于或等于第二差异阈值的情况下,根据所述第三容量的数值和所述第三容量对应的第三校验值更新所述电量计的闪存中存储的校验数据;If so, if a second difference between the third capacity and the first capacity is greater than or equal to a second difference threshold, updating the verification data stored in the flash memory of the fuel gauge according to the value of the third capacity and a third verification value corresponding to the third capacity; 若否,则清除所述电量计的闪存中所存储的校验数据。If not, the calibration data stored in the flash memory of the fuel gauge is cleared. 6.如权利要求3所述的电池电量的确定方法,其特征在于,所述方法还包括:6. The method for determining the battery power level according to claim 3, characterized in that the method further comprises: 在确定当前满足数据更新条件并且所述电量计的电量学习信息为所述第一信息的情况下,将所述电量计的电量学习信息更新为所述第二信息;和/或When it is determined that the data update condition is currently met and the electric quantity learning information of the electric quantity meter is the first information, updating the electric quantity learning information of the electric quantity meter to the second information; and/or 在确定所述终端设备与所述第一电池断开连接的情况下,将所述电量计的电量学习信息更新为所述第一信息。When it is determined that the terminal device is disconnected from the first battery, the power learning information of the power meter is updated to the first information. 7.如权利要求1-6任一项所述的电池电量的确定方法,其特征在于,在所述确定所述第一电池的当前满充容量之前,所述方法还包括:7. The method for determining battery power according to any one of claims 1 to 6, characterized in that before determining the current full charge capacity of the first battery, the method further comprises: 在所述充电过程中,如果根据所述充电数据确定所述第一电池的电量已满,则确定当前满足所述数据更新条件;和/或During the charging process, if it is determined according to the charging data that the power of the first battery is full, it is determined that the data update condition is currently met; and/or 在所述放电过程中,如果根据所述放电数据确定所述第一电池的电量已被放空,则确定当前满足数据更新条件。During the discharging process, if it is determined according to the discharging data that the power of the first battery has been discharged, it is determined that a data updating condition is currently met. 8.如权利要求7所述的电池电量的确定方法,其特征在于,在所述确定所述第一电池的当前满充容量之后,所述方法还包括:8. The method for determining battery power according to claim 7, characterized in that after determining the current full charge capacity of the first battery, the method further comprises: 在根据所述充电数据确定所述第一电池的电量已满的情况下,确定并更新所述第一电池的当前剩余容量和/或当前剩余电量,其中所述当前剩余容量等于所述当前满充容量,所述当前剩余电量等于满充电量;和/或In a case where it is determined according to the charging data that the first battery is fully charged, determining and updating a current remaining capacity and/or a current remaining power of the first battery, wherein the current remaining capacity is equal to the current fully charged capacity, and the current remaining power is equal to the fully charged power; and/or 在根据所述放电数据确定所述第一电池的电量已被放空的情况下,确定并更新所述第一电池的当前剩余容量和/或当前剩余电量,其中所述当前剩余容量等于放空容量,所述当前剩余电量等于放空电量。When it is determined according to the discharge data that the power of the first battery has been discharged, the current remaining capacity and/or the current remaining power of the first battery are determined and updated, wherein the current remaining capacity is equal to the discharged capacity, and the current remaining power is equal to the discharged power. 9.如权利要求1-6任一项所述的电池电量的确定方法,其特征在于,所述方法还包括:9. The method for determining the battery power according to any one of claims 1 to 6, characterized in that the method further comprises: 响应于开机指令,确定所述第一电池对应的第一电池曲线参数;In response to a power-on instruction, determining a first battery curve parameter corresponding to the first battery; 如果所述第一电池曲线参数与所述电量计中存储的第二电池曲线参数不同,则将所述第一电池曲线参数更新到所述电量计中,以使所述电量计根据所述第一电池曲线参数确定所述第一电池的初始电量;If the first battery curve parameter is different from a second battery curve parameter stored in the fuel gauge, updating the first battery curve parameter into the fuel gauge so that the fuel gauge determines the initial power of the first battery according to the first battery curve parameter; 清除所述电量计的闪存中存储的第一容量。The first capacity stored in the flash memory of the fuel gauge is cleared. 10.一种终端设备,其特征在于,包括:存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现如权利要求1至8任一项所述的电池电量的确定方法的步骤。10. A terminal device, characterized in that it comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the steps of the method for determining the battery power as described in any one of claims 1 to 8 are implemented.
CN202411577903.6A 2024-11-06 2024-11-06 Method for determining battery power and terminal equipment Pending CN119689286A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202411577903.6A CN119689286A (en) 2024-11-06 2024-11-06 Method for determining battery power and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202411577903.6A CN119689286A (en) 2024-11-06 2024-11-06 Method for determining battery power and terminal equipment

Publications (1)

Publication Number Publication Date
CN119689286A true CN119689286A (en) 2025-03-25

Family

ID=95026330

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202411577903.6A Pending CN119689286A (en) 2024-11-06 2024-11-06 Method for determining battery power and terminal equipment

Country Status (1)

Country Link
CN (1) CN119689286A (en)

Similar Documents

Publication Publication Date Title
CN110709717B (en) A method for estimating battery health of mobile devices based on slack voltage
WO2017000912A2 (en) Battery state of health detection device and method
JP2022514992A (en) Battery diagnostic system, battery diagnostic method, and storage medium
CN115616421B (en) Battery state of health estimation method, system, equipment and medium
WO2021136419A1 (en) Soc estimation accuracy determination method, device, and storage medium
CN111983495A (en) Battery pack health degree determination method and related device
US20140306712A1 (en) Tracking aging effect on battery impedance and tracking battery state of health
WO2013075420A1 (en) Method and device for calculating battery electricity quantity, and terminal
JPH11233157A (en) Battery pack and battery system
KR102569897B1 (en) Method and apparatus for diagnosing vehicle battery
CN110888065A (en) Battery pack state of charge correction method and device
US20100332166A1 (en) Information processing apparatus and battery degradation detection method
JP7075984B2 (en) Smart battery device
CN111521945B (en) Battery health state detection method and device, electronic equipment and storage medium
CN111856307A (en) Method, device, storage medium and smart device for estimating battery SoH
JPH08313604A (en) Storage battery life diagnosis method and life diagnosis device
CN115015773A (en) Method and apparatus for estimating battery state
CN112946562B (en) Power failure protection method and device for double-core intelligent electric meter and double-core intelligent electric meter
CN119689286A (en) Method for determining battery power and terminal equipment
CN118868302A (en) Method, device and equipment for calibrating state of charge at charging terminal of battery system
CN111179670B (en) Method and device for quantifying physical and electrical experiment result, terminal and storage medium
CN118818359A (en) A method and device for obtaining battery health status
JP6091822B2 (en) Diagnostic device and diagnostic method
JP2002078211A (en) Battery-powered electronic devices
CN115728642A (en) Method and device for determining percentage of electric quantity of battery, electric energy meter and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination