Calibration method and device, electronic equipment and chip
By obtaining the estimated value of the open circuit voltage when the battery pack of the mobile terminal is not calibrated and writing it to the battery meter IC, the problem of the battery pack not calibrating for a long time is solved, and automatic calibration and efficiency improvement is achieved.
Patent Information
- Application Number
- CN202411528878.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-29
- Publication Date
- 2025-02-11
AI Technical Summary
The mobile terminal cannot enter the power calibration mode when the standby time is insufficient, resulting in the battery pack not being calibrated for a long time and a jump occurs.
When the discharge depth of the battery pack is not calibrated for more than the preset number of days, the estimated value of the open circuit voltage of the battery pack is obtained and written to the meter integrated circuit with the command code that triggers the calibration, so that the meter IC is performed based on the estimated value calibration.
Automatic calibration is realized when the battery pack is not calibrated for a long time, avoiding the jump caused by uncalibration of power and improving calibration efficiency.
Smart Images

Figure CN119414273A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a calibration technology for the discharge depth in a battery pack, and more particularly to a calibration method, device, electronic device and chip. Background Art
[0002] At present, a mobile terminal requires the user to be idle for a sufficient period of time before it can enter a power calibration mode. However, due to the harsh conditions for the mobile terminal to enter the power calibration mode, the problem of the mobile terminal not being calibrated for a long time occurs, resulting in a phenomenon of power jumps due to the long-term failure to meet the power calibration conditions. Summary of the invention
[0003] The embodiments of the present application provide a calibration method, device, electronic device and chip, which can avoid the phenomenon of uncalibrated power of a battery pack for a long time and improve the calibration efficiency.
[0004] The technical solution of this application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides a calibration method, which is applied to an electronic device and includes:
[0006] When the current uncalibrated number of days of the depth of discharge (DOD) of the battery pack of the electronic device exceeds a preset number of days, obtaining an estimated value of the open circuit voltage (OCV) of the battery pack;
[0007] The estimated value of OCV and a command code for triggering calibration are written into a fuel gauge integrated circuit (IC) in the battery pack, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of OCV.
[0008] In a second aspect, an embodiment of the present application provides a calibration device, which is arranged in an electronic device and includes:
[0009] An acquisition module, configured to acquire an estimated value of the OCV of the battery pack when the current uncalibrated days of the DOD of the battery pack of the electronic device exceeds a preset number of days;
[0010] The calibration module is used to write the estimated value of OCV and the command code for triggering calibration into the fuel gauge IC in the battery pack, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of OCV.
[0011] In a third aspect, an embodiment of the present application provides an electronic device, the electronic device comprising:
[0012] Memory for storing computer programs;
[0013] A processor, connected to the memory, and configured to call and run the computer program from the memory to implement the method described in one or more of the above embodiments;
[0014] A transceiver is used to send and receive information during the process of sending and receiving information between other devices.
[0015] In a fourth aspect, an embodiment of the present application provides a chip, the chip comprising:
[0016] A processor, configured to call and run a computer program from a memory, so that a device equipped with the chip executes the method described in one or more of the above embodiments;
[0017] A transceiver is used to send and receive information during the process of sending and receiving information between a device or chip.
[0018] The embodiments of the present application provide a calibration method, device, electronic device and chip. When the current uncalibrated number of days of the DOD of a battery pack of an electronic device exceeds a preset number of days, an estimated value of the OCV of the battery pack is obtained, and the estimated value of the OCV and a command code for triggering calibration are written into a fuel gauge IC in the battery pack, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of the OCV. That is, in the embodiments of the present application, by obtaining an estimated value of the OCV of the battery pack when the current uncalibrated number of days of the DOD of the battery pack of the electronic device exceeds a preset number of days, that is, when the DOD of the battery pack has not been calibrated for a long time, by obtaining an estimated value of the OCV, and writing the estimated value and a command code for triggering calibration into the fuel gauge IC, so that the fuel gauge IC calibrates the DOD of the battery pack to obtain the calibrated DOD. In this way, by obtaining an estimated value of the OCV when the DOD has not been calibrated for a long time, the DOD can be calibrated, thereby preventing the DOD from being calibrated for a long time and improving the calibration efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] Figure 1 A schematic diagram of the architecture of a battery pack in the related art;
[0020] Figure 2 It is a schematic diagram of the OCV-DOD curve in the related art;
[0021] Figure 3 A schematic diagram showing the distribution ratio of the maximum duration of DOD uncalibration of the power meter IC in the related art;
[0022] Figure 4 A schematic diagram of a flow chart of an optional calibration method provided in an embodiment of the present application;
[0023] Figure 5 A schematic diagram of a first-order equivalent circuit module of an optional battery provided in an embodiment of the present application;
[0024] Figure 6 A schematic flow chart of an example of an optional calibration method provided in an embodiment of the present application;
[0025] Figure 7 A schematic diagram of a curve of an optional terminal voltage of a battery pack and an estimated value of OCV provided in an embodiment of the present application;
[0026] Figure 8 A schematic diagram of the structure of an optional calibration device provided in an embodiment of the present application;
[0027] Fig. 9 A schematic diagram of the structure of an optional electronic device provided in an embodiment of the present application;
[0028] Fig.10 A schematic diagram of the structure of an optional chip provided in an embodiment of the present application. DETAILED DESCRIPTION
[0029] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application.
[0030] Figure 1 Schematic diagram of the battery pack structure in the related art, such as Figure 1 As shown, the battery pack 100 includes a cell 11, an integrated circuit (IC) 12, a protection IC 13, a charge and discharge metal-oxide-semiconductor field-effect transistor (MOSFET) 14, a fuse (FUSE) 15, a negative temperature coefficient (NTC) 16, and a resistor (Rsense) 17. Among them, the protection IC 13 includes: a primary protection (Protector) 131 and a secondary protection (2ndProtector) 132, and the charge and discharge MOSFET 14 includes: a charge switch (Charge Field-Effect Transistor, CHGFET) 141 and a discharge switch (Discharge Field-Effect Transistor, DSG FET) 142.
[0031] exist Figure 1In the process, the fuel gauge IC manages the battery cells. Its main task is to output the battery charge by collecting information about the battery voltage, battery current, and battery temperature. High-precision sampling, low-power operation, communication, and data processing are implemented on the hardware side. The battery is accurately modeled in the algorithm, and algorithm programming, data processing, and calculation of effective information are implemented in the form of firmware. The relevant basic knowledge is introduced as follows:
[0032] Maximum capacity Qmax: When the battery is fully charged and discharged at a small current of C / 20, the capacity discharged when it reaches the battery cut-off voltage is called battery Qmax, which is directly affected by battery aging and temperature.
[0033] OCV: The stable voltage of the battery without load. The OCV of the battery under different DOD is connected into a curve to form an OCV-DOD curve. It is not affected by battery aging and is only related to temperature and battery type. This curve is the basis for all calculations of the fuel gauge.
[0034] Depth of discharge: The ratio of the amount of electricity discharged by the battery to the total capacity. It is a mathematical scale. DOD is the opposite of the battery's state of charge (SOC).
[0035] The current cumulative capacity of charge or discharge (PassedCharge): is the current cumulative capacity of charge or discharge, starting from DOD0, and is directly obtained by coulomb counter integration.
[0036] Figure 2 It is a schematic diagram of the OCV-DOD curve in the related technology, such as Figure 2 As shown, the fuel gauge IC enters the fuel gauge calibration mode to obtain the initial DOD1. The conditions for entering the calibration mode are as follows:
[0037] First, the current of the mobile terminal in standby mode is less than current A (for example, A is 150 mA) for a period of time B (for example, B is 1 hour);
[0038] Second, the current of the mobile terminal in standby mode is less than current A (for example, A is 150mA), and the battery terminal voltage is stable enough, and the voltage difference between two consecutive 100s is less than C (for example, C is 30mv).
[0039] The calculation of PassedCharge is performed by Coulomb integration, and there must be a current integration error. In order to eliminate this error, the mobile terminal needs to be on standby for a sufficient time and the standby time is sufficient so that the battery OCV and the battery terminal voltage are basically equal. At this time, DOD1 can be obtained by looking up the OCV table, which is:
[0040] DOD1=f(OCV,T) (1)
[0041] Then, PassedCharge is calculated by current integration, and the DOD2 of the current position of the battery can be calculated, which is:
[0042]
[0043] When the mobile terminal meets the calibration conditions next time, DOD1 will be updated in the same way as the table lookup. If the new DOD1 is far from the old DOD1, Qmax will be updated, which is
[0044]
[0045] Due to the harsh calibration conditions of mobile terminals (users need to be on standby for a sufficient period of time), users often fail to meet the power calibration conditions for a long time, resulting in jumps. Figure 3 Schematic diagram of the distribution ratio of the maximum duration of DOD uncalibration of the power meter IC in the related art, such as Figure 3 As shown, it can be seen that a small number of users have not calibrated for as long as 9 or 10 days. Therefore, it is necessary to solve the problem of long-term non-calibration of power in mobile terminals.
[0046] In view of the technical problem in the related art that the power of a mobile terminal is not calibrated for a long time, an embodiment of the present application provides a calibration method. Figure 4 A flow chart of an optional calibration method provided in an embodiment of the present application is shown as follows: Figure 4 As shown, the calibration method may include:
[0047] S401: when the current uncalibrated days of the DOD of the battery pack of the electronic device exceeds a preset number of days, obtaining an estimated value of the OCV of the battery pack of the electronic device;
[0048] In order to prevent the DOD of the battery pack from not being calibrated for a long time, in an embodiment of the present application, in S401, when the current number of days that the DOD of the battery pack of the electronic device has not been calibrated exceeds a preset number of days, the electronic device obtains an estimated value of the OCV of the battery pack. Here, the estimated value of the OCV of the battery pack may be obtained from other devices, or the estimated value of the OCV of the battery pack may be determined by itself. Here, the embodiment of the present application does not make any specific limitation on this.
[0049] For electronic devices, the processor of the electronic device may obtain the estimated value of the OCV of the battery pack, or the fuel gauge IC of the electronic device may obtain the estimated value of the OCV of the battery pack. Here, the embodiments of the present application do not make specific limitations on this.
[0050] In S401, by comparing the current uncalibrated days of the DOD of the battery pack with the preset days, if the current uncalibrated days of the DOD is greater than or equal to the preset days, it means that the DOD of the battery pack has not been calibrated for a long time, and the electronic device obtains the estimated value of the OCV of the battery pack; if the current uncalibrated days of the DOD is less than the preset days, it means that the DOD of the battery pack has not been uncalibrated for a long time, and the acquisition of the estimated value of the OCV of the battery pack is not triggered.
[0051] In actual applications, the application layer of the electronic device obtains the current uncalibrated days from the Kernel, compares the current uncalibrated days with the preset days, and obtains the estimated value of OCV when the current uncalibrated days are greater than or equal to the preset days.
[0052] In addition, the estimated value of the above OCV may be calculated based on a Forgetting Factor Recursive Least Square (FFRLS) algorithm containing a forgetting factor. Of course, it may also be calculated using other algorithms, and this is not specifically limited in the embodiments of the present application.
[0053] In addition, the above-mentioned method of obtaining the estimated value can be determined by screening multiple estimated values. Of course, an estimated value can also be obtained by direct calculation. Here, the embodiment of the present application does not make specific limitations on this.
[0054] It should be noted that the above-mentioned OCV estimate of the battery pack of the electronic device can be obtained not only when the DOD of the battery pack has not been calibrated for a long time, but also according to preset time intervals, or other trigger conditions. Here, the embodiments of the present application do not make specific limitations on this.
[0055] In S401 , whether to trigger acquisition of the estimated value of the OCV of the battery pack is determined by comparing the current uncalibrated days with the preset days, so that calibration of the DOD can be triggered when the DOD has not been calibrated for a long time, thereby improving calibration efficiency.
[0056] S402: Write the estimated value of OCV and the command code for triggering calibration into the fuel gauge IC in the battery pack, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of OCV.
[0057] Through S401, an estimated value of the OCV of the battery pack when the DOD of the battery pack has not been calibrated for a long time is obtained. In S402, the electronic device writes the estimated value of the OCV and the command code for triggering calibration into the fuel gauge IC. Here, the estimated value of the OCV can be judged first. Only when the estimated value of the OCV is within a certain range, the electronic device writes the command code for triggering calibration together with the estimated value of the OCV into the fuel gauge IC, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of the OCV.
[0058] Here, the fuel gauge IC can determine the calibrated DOD from a preset corresponding relationship based on the estimated value of OCV, the current number of charge and discharge cycles of the battery pack, and the current temperature of the battery pack. Here, if any one of the estimated value of OCV, the current number of charge and discharge cycles of the battery pack, and the current temperature of the battery pack cannot be found in the preset corresponding relationship, then the interpolation method is required to determine the calibrated DOD.
[0059] Here, the calibration of the DOD of the battery pack can be completed through the interaction between the application layer and the Kernel in the electronic device. For example, the application layer sends the acquired OCV estimate to the Kernel, and the Kernel writes the OCV estimate and the command code for triggering calibration into the fuel gauge IC in the battery pack, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the OCV estimate, thereby completing the calibration of the DOD of the battery pack.
[0060] In order to trigger the calibration of DOD at an appropriate time, in an optional embodiment, when the current uncalibrated days of DOD of the battery pack exceed a preset number of days, obtaining the estimated value of OCV of the battery pack may include:
[0061] When the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, an estimated value of the OCV of the battery pack is obtained.
[0062] It is understandable that since the battery current in the charging state is a step-like constant current, the FFRLS algorithm is prone to divergence, so the estimated value of the OCV of the battery pack is obtained when the current in the discharging state fluctuates.
[0063] Then, in addition to comparing the current uncalibrated days of the DOD of the battery pack with the preset days, it is also determined whether the electronic device is in a discharging state. If the current uncalibrated days of the DOD is greater than or equal to the preset days, and the electronic device is in a discharging state, the electronic device obtains an estimated value of the OCV of the battery pack. If the current uncalibrated days of the DOD is less than the preset days, or the electronic device is in a charging state, then the acquisition of the estimated value of the OCV of the battery pack is not triggered.
[0064] In actual applications, the electronic device obtains its own battery status, and the application layer of the electronic device obtains the current uncalibrated days of DOD from the Kernel, compares the current uncalibrated days of DOD with the preset days, and obtains the estimated value of OCV when it is greater than or equal to and in a discharging state.
[0065] In this way, when the electronic device is in a discharging state, by comparing the current uncalibrated days of DOD with the preset days, it is determined whether to trigger the acquisition of the estimated value of the OCV of the battery pack, thereby being able to trigger the calibration of DOD when the DOD has not been calibrated for a long time, thereby improving the calibration efficiency.
[0066] In order to obtain an estimated value of the OCV of the battery pack, in an optional embodiment, when the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, obtaining an estimated value of the OCV of the battery pack may include:
[0067] When the current uncalibrated days of the DOD of the battery pack exceeds the preset days and the electronic device is in a discharging state, the FFRLS algorithm is used to determine the estimated value of the OCV of the battery pack based on the acquired battery voltage of the battery pack and the acquired battery current of the battery pack.
[0068] It can be understood that when the current uncalibrated days of the DOD of the battery pack exceeds the preset number of days and the electronic device is in a discharging state, in order to determine the estimated value of the OCV of the battery pack, in an embodiment of the present application, the battery voltage of the battery pack and the battery current of the battery pack are first obtained, and then based on the battery voltage and the battery current, the FFRLS algorithm is used to calculate the estimated value of the OCV of the battery pack.
[0069] In this way, an accurate OCV estimate can be obtained through the FFRLS algorithm, which is beneficial to improving the calibration accuracy of DOD.
[0070] In order to further improve the accuracy of the estimated value of OCV, in an optional embodiment, when the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, the estimated value of the OCV of the battery pack is determined based on the acquired battery voltage of the battery pack and the acquired battery current of the battery pack by using the FFRLS algorithm, which may include:
[0071] When the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, obtaining the battery voltage and the battery current at every preset first time period through the application layer of the electronic device;
[0072] Determine an initial estimated value of the OCV of the battery pack by using the FFRLS algorithm based on the battery voltage and the battery current through the application layer until a preset number of initial estimated values are determined;
[0073] When the standard deviation of the preset number of initial estimated values is less than a preset threshold, the application layer determines the initial estimated value finally determined among the preset number of initial estimated values as the estimated value of the OCV of the battery pack.
[0074] It can be understood that the application layer of the electronic device obtains the battery voltage and battery current of a group of battery packs in each preset first time period, and then adopts the FFRLS algorithm to calculate the initial estimated value of OCV corresponding to each group of battery voltage and battery current. In this way, by accumulation, a preset number of initial estimated values can be obtained.
[0075] Here, the standard deviation of the preset number of initial estimates can be calculated and compared with the preset threshold. If it is less than, it means that the FFRLS algorithm is converged and DOD calibration can be performed. Then, the application layer uses the final initial estimate determined from the preset number of initial estimates as the estimated value of OCV. If it is greater than or equal to, no calibration is performed.
[0076] It should be noted that the above-mentioned preset number of initial estimated values can also be obtained in the following manner: for each initial estimated value calculated above, it is necessary to select a value whose difference with the terminal voltage of the battery pack is less than the preset voltage value until a preset number of initial estimated values is obtained, for example, the preset voltage value is 100mv.
[0077] In this way, the application layer of the electronic device determines a preset number of initial estimated values in a cumulative manner, and only determines the estimated value of OCV when certain conditions are met, thereby triggering the calibration of DOD. In this way, the calibration of DOD can be triggered in a timely manner to prevent long-term non-calibration and avoid frequent triggering of DOD calibration.
[0078] In order to obtain the real uncalibrated days in the fuel gauge IC, in an optional embodiment, the method further includes:
[0079] Obtain the current uncalibrated days and current calibration parameters through the Kernel of the electronic device;
[0080] Obtaining, by the Kernel, a verification calibration parameter of the fuel gauge IC from the fuel gauge IC at every preset second time period;
[0081] When the current verification and calibration parameters are not equal to the verification and calibration parameters of the fuel gauge IC, the current uncalibrated days are set to 0 through the Kernel, and the current verification and calibration parameters are updated to the verification and calibration parameters of the fuel gauge IC;
[0082] When the current verification calibration parameter is equal to the verification calibration parameter of the fuel gauge IC, the value obtained by adding 1 to the current uncalibrated days is re-determined as the current uncalibrated days through the Kernel;
[0083] The current uncalibrated days and the current calibration parameters are sent to the application layer through the Kernel, and an update calibration instruction is sent to the application layer to update the current uncalibrated days and the current calibration parameters in the application layer.
[0084] It can be understood that the Kernel obtains the current uncalibrated days and the current calibration verification parameter, wherein the current calibration verification parameter is a parameter that changes with the calibration of the fuel gauge IC; that is, the current calibration verification parameter here is a parameter indicating whether the fuel gauge IC is calibrated.
[0085] Among them, the Kernel can be the current uncalibrated days and the current calibration parameters obtained from the application layer. For example, when the electronic device is turned on to the desktop, the Kernel sends a calibration parameter acquisition instruction to the application layer, thereby obtaining the current uncalibrated days and the current calibration parameters from the application layer. It can also be that the Kernel obtains the current uncalibrated days and the current calibration parameters from the electricity meter IC at every preset second time period, so that the Kernel stores the current uncalibrated days and the current calibration parameters.
[0086] After obtaining the current number of uncalibrated days and the current verification calibration parameters, the kernel accesses the fuel meter IC through the Inter-Integrated Circuit (I2C) bus every preset second time period, obtains the verification calibration parameters of the fuel meter IC from the fuel meter IC, and compares them with the current verification calibration parameters to see whether they are equal.
[0087] If they are not equal, it means that the fuel gauge IC has calibrated the DOD within the preset second time period, and the kernel sets the current uncalibrated days to 0, and updates the current verification calibration parameters to the verification calibration parameters of the fuel gauge IC. If they are equal, it means that the fuel gauge IC has not calibrated the DOD within the preset second time period, so the current uncalibrated days can be increased by 1.
[0088] Finally, the Kernel sends the current uncalibrated days and the current calibration verification parameters to the application layer, and sends an update calibration instruction to the application layer, so that the application layer updates the current uncalibrated days and the current calibration verification parameters stored locally. The current uncalibrated days can be used to determine whether to trigger the calibration DOD.
[0089] In this way, by periodically obtaining the current uncalibrated days and the current verification calibration parameters from the fuel gauge IC through the Kernel, the current uncalibrated parameters in the Kernel and application layer can be updated in real time to accurately determine whether to perform DOD calibration, which is conducive to triggering DOD calibration at the right time and improving calibration efficiency.
[0090] In order to enable the fuel gauge IC to obtain the DOD of the battery pack after calibration based on the estimated value of the OCV, in an optional embodiment, S402 may include:
[0091] When receiving the estimated OCV value of the battery pack from the application layer of the electronic device, the current uncalibrated days are set to 0 through the Kernel of the electronic device, and the estimated OCV value and the command code for triggering calibration are written to the fuel gauge IC, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated OCV value.
[0092] It can be understood that after the Kernel receives the estimated value of OCV obtained by the application layer, since DOD calibration is required, the current uncalibrated days in the Kernel are cleared, and then the estimated value of OCV and the command code for triggering calibration are written to the fuel gauge IC, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of OCV.
[0093] In this way, the current uncalibrated days in the Kernel are cleared to zero before the DOD is calibrated, so that the current uncalibrated days can be accurately updated, thereby triggering the DOD calibration at an appropriate time and improving the calibration efficiency.
[0094] In order for the fuel gauge IC to determine the calibrated DOD, in an optional embodiment, the fuel gauge IC obtains the calibrated DOD of the battery pack based on the estimated value of the OCV, including:
[0095] The fuel gauge IC obtains the current charge and discharge cycle number of the battery pack, the current temperature of the battery pack, and the first corresponding relationship;
[0096] The fuel gauge IC determines the DOD corresponding to the estimated value of the OCV from the first corresponding relationship based on the current number of charge and discharge cycles and the current temperature, and determines the DOD corresponding to the estimated value of the OCV as the DOD after the battery pack is calibrated.
[0097] It can be understood that after knowing the estimated value of OCV, the fuel gauge IC also needs to obtain the current number of charge and discharge cycles, the current temperature and the first corresponding relationship, where the first corresponding relationship is: the correspondence between the OCV of the battery pack and the DOD of the battery pack under the preset number of charge and discharge cycles and the preset temperature.
[0098] That is to say, the first correspondence records the correspondence between OCV-DOD under different charge and discharge cycle numbers and different temperatures. Therefore, when the fuel gauge IC knows the estimated value of OCV, the current charge and discharge cycle number and the current temperature, it can determine the corresponding DOD by looking up a table or interpolation method, and use it as the DOD after the battery pack is calibrated.
[0099] In this way, the DOD is calibrated by a lookup table or interpolation method, and the estimated value of OCV, the number of charge and discharge cycles and the temperature are involved, so that the calibrated DOD is more accurate and the calibration accuracy is further improved.
[0100] In order to obtain the calibrated DOD from the first corresponding relationship, in an optional embodiment, the fuel gauge IC determines the DOD corresponding to the estimated value of OCV from the first corresponding relationship based on the current number of discharge cycles and the current temperature, including:
[0101] In the case where the second corresponding relationship exists in the first corresponding relationship, the fuel gauge IC determines the DOD corresponding to the estimated value of the OCV from the second corresponding relationship;
[0102] In the case that the second corresponding relationship does not exist in the first corresponding relationship, the fuel gauge IC determines the second corresponding relationship based on the first corresponding relationship by using an interpolation method;
[0103] The fuel gauge IC determines the DOD corresponding to the estimated value of OCV from the second corresponding relationship.
[0104] It can be understood that after knowing the estimated value of OCV, the current number of charge and discharge cycles, the current temperature and the first correspondence, the fuel gauge IC needs to check whether there is a second correspondence in the first correspondence, wherein the second correspondence is: the correspondence between the OCV of the battery pack and the DOD of the battery pack at the current number of discharge cycles and the current temperature, and the OCV in the second correspondence includes the estimated value of OCV.
[0105] That is, the first correspondence records the correspondence between OCV-DOD at the current charge and discharge cycle number and the current temperature, and OCV includes an estimated value of OCV. If it exists, the calibrated DOD can be directly determined by looking up the table.
[0106] If it does not exist, specifically, when the current charge and discharge cycle number does not exist, then based on the preset charge and discharge cycle number in the first corresponding relationship, the interpolation method is used to obtain the corresponding relationship between OCV-DOD at the preset temperature under the current charge and discharge cycle number. When the current temperature does not exist, a similar method is used as the current charge and discharge cycle number to obtain the corresponding relationship between OCV-DOD under the current charge and discharge cycle number and the current temperature. When the estimated value of OCV does not exist, a similar method is used as the current charge and discharge cycle number to finally obtain the corresponding relationship between OCV-DOD under the current charge and discharge cycle number and the current temperature, and OCV includes the estimated value of OCV.
[0107] In this way, different methods are used to determine the calibrated DOD according to different situations, which can improve the accuracy of the calibrated DOD.
[0108] The calibration method described in one or more of the above embodiments is described below with examples.
[0109] Figure 5 A schematic diagram of a first-order equivalent circuit module of an optional battery provided in an embodiment of the present application, such as Figure 5 As shown, the first-order equivalent circuit model can include: Ohmic resistance R o , diffusion resistance Rp and diffusion capacitance Rp.
[0110] Among them, the ohmic resistance R o Used to represent the resistance of battery components as charges accumulate and dissipate in the double layer. The RC network is used to simulate the diffusion voltage. This slow voltage change trend is due to the polarization phenomenon caused by the imbalance of electrode ion concentration caused by the slow diffusion of lithium ions in the battery. Rp and Rp are respectively called diffusion resistance and diffusion capacitance. According to circuit principles, the electrical behavior of the first-order equivalent circuit model can be written in discrete time form:
[0111]
[0112] The dynamic voltage is defined as:
[0113] U e (k) = U t (k)-U OCV (k) = U p (k)+R o I(k) (5)
[0114] After finishing, we can get:
[0115]
[0116] Substituting the dynamic voltage expression into the terminal voltage expression yields:
[0117]
[0118] in, Define the identification vector of the model:
[0119]
[0120] Right now
[0121] θ k (3) = (1-θ k (4))U OCV =U OCV -θ k (4)U OCV (9)
[0122] U OCV =θ k (4)U OCV +θ k (3) (10)
[0123] U OCV (k) = θ k (4)U OCV (k-1)+θ k (3) (11)
[0124] Therefore, as long as the parameter identification estimates θ in real time k (3) and θ k (4), the open-circuit voltage U at this moment can be iteratively estimated by the open-circuit voltage at the previous moment OCV (k-1), enhancing the response and adaptability of OCV identification to dynamic conditions.
[0125] The formula of the least square method with forgetting factor is:
[0126]
[0127] Recursive least squares is a recursive algorithm used to solve linear regression problems. Its goal is to estimate system parameters by minimizing the sum of squares of errors. Recursive least squares with forgetting factor introduces a forgetting factor based on the standard RLS algorithm, which makes new data have a greater weight than old data, thereby speeding up the response to parameter changes. The forgetting factor λ is generally 0.95 to 0.995, and when λ=1, it means that it is not forgotten. In the case of low sampling frequency, a smaller λ value (0.95) is usually better because it can forget old data faster and adapt to new data more quickly, thereby better tracking the dynamic changes of the system. Based on the above background knowledge, a real-time calibration design based on mobile terminal power is designed.
[0128] Figure 6 A flow chart of an example of an optional calibration method provided in an embodiment of the present application is shown as follows: Figure 6 As shown, during the startup of the mobile terminal, the Kernel charging driver program will be loaded first, and then the AIDL charging service program will be loaded in the application layer. The calibration method may include:
[0129] S601: The mobile phone starts; S602 and S603 are executed;
[0130] S602: Load the application layer AIDL charging service program; execute S611 and S612;
[0131] Among them, the above-mentioned application layer AIDL charging service program can be referred to as ADL for short.
[0132] S603: Kernel charging driver program is loaded; S604 and S630 are executed;
[0133] Among them, the above-mentioned Kernel charging driver program can be referred to as Kernel for short.
[0134] S604: Determine whether to boot to the desktop? If yes, execute S605;
[0135] S605: Kernel sends a calibration parameter acquisition cmd to AIDL (AIDL will return a data packet, which includes DOD uncalibrated days A and DOD verification calibration parameter B); execute S606;
[0136] S606: The kernel checks whether the DOD is calibrated regularly every day, and communicates with the power meter IC through the I2C bus to obtain the DOD verification calibration parameter C; execute S607;
[0137] S607: Kernel determines whether B and C are equal. If yes, execute S608; if no, execute S609;
[0138] S608: The same parameters indicate that there is no calibration. Kernel adds 1 to the number of days that the DOD is not calibrated, and updates the DOD verification calibration parameter B to the DOD verification calibration parameter C. Execute S610;
[0139] S609: The different parameters indicate that there is a calibration, and the Kernel sets the DOD uncalibrated days to 0 days, and updates the DOD verification calibration parameter B to the DOD verification calibration parameter C; execute S610;
[0140] S610: Kernel packages the updated DOD uncalibrated days and DOD verification calibration parameter B into a data packet and sends it to AIDL, and sends the update calibration parameter cmd to AIDL; execute S612;
[0141] That is to say, when the mobile terminal is powered on to the desktop (AIDL and Kernel can interact with each other only when boot_complete), Kernel will send a calibration parameter acquisition command (cmd) to AIDL (AIDL will return a data packet, which includes: DOD uncalibrated days A and DOD verification calibration parameter B), Kernel will check whether DOD is calibrated in a 1-day cycle, that is, the Kernel driver on the wireless access point (AP) side accesses the fuel gauge IC through I2C, and the fuel gauge IC will return the relevant parameters of DOD, such as DOD verification calibration parameter C, to the AP side.
[0142] Then, the kernel will compare whether B and C are equal. If they are not equal, it indicates that the fuel gauge IC is calibrated. At this time, the DOD uncalibrated days A is set to 0 days, and the DOD calibration parameter B is updated to the calibration parameter C. If the parameters are the same, it indicates that there is no calibration, and the DOD uncalibrated days A = A + 1 day, and the DOD calibration parameter B is updated to the calibration parameter C. Finally, the kernel packages the updated A and B into a data packet for interaction with AIDL, and sends the update parameter calibration cmd to AIDL.
[0143] S611: AIDL loads the OCV online identification OGALG module and executes S619;
[0144] The above-mentioned OCV online identification OGALG module may be referred to as OGALG module for short.
[0145] S612: AIDL loads the AIDL and Kernel information interaction module and executes S613;
[0146] Among them, the above-mentioned AIDL and Kernel information interaction module can be simply referred to as an interaction module.
[0147] S613: The interaction module determines whether it has received the Kernel data request. If yes, execute S614;
[0148] S614: The interaction module determines whether the data request is to obtain the calibration parameter cmd. If yes, execute S615; if no, execute S616;
[0149] S615: The interactive module reads the charging specific partition, reads the DOD uncalibrated days and the DOD verification calibration parameters from the partition, and calculates the checksum. If the checksum fails, it indicates that the DOD-related initial information of the partition is wrong, and the default DOD value is set to 0; return to execute S613;
[0150] S616: The interaction module determines whether the data request is to update the calibration parameter cmd. If yes, execute S617; if no, execute S618;
[0151] S617: the interaction module parses the data packet sent by the Kernel to the AIDL in a fixed format to obtain the DOD uncalibrated days and the DOD verification calibration parameters, and writes them to the charging specific partition; return to execute S613;
[0152] S618: Other command processing.
[0153] It can be seen that the AIDL charging service program will load the battery OCV online identification OGALG module and the AIDL and Kernel information interaction module. For the AIDL and Kernel information interaction module, it will always wait for the Kernel's data request. If there is a data request, it will need to determine what kind of cnd it is. If it is to obtain parameter calibration cmd, it will read the charging specific partition, read the DOD uncalibrated days and DOD verification calibration parameters in the partition (not lost in case of power failure), and calculate its checksum. If the checksum fails, it means that the DOD-related initial value of the partition is wrong, then the relevant DOD parameter values are set to 0 by default.
[0154] If it is to update the calibration parameters cmd, the data packet sent by the Kernel to AIDL is parsed in a fixed format to obtain the DOD uncalibrated days and DOD verification calibration parameters, and write them to the charging specific partition; if it is other commands, other commands are processed.
[0155] S619: The OGALG module determines whether the number of days without DOD calibration exceeds a certain threshold and whether it is in discharge mode. If both are yes, execute S620;
[0156] S620: The OGALG module starts running the FFRLS algorithm; execute S621;
[0157] S621: The OGALG module initializes relevant variables (e.g., initial impedance, initial OCV); Execute S622;
[0158] In order to achieve quick convergence, the initial OCV is equal to the collected battery voltage, and the initial covariance matrix is set to 1e6, so that the output result is more reliable in the measured value.
[0159] In the OGALG module, it will continuously monitor and determine whether the number of days that the DOD has not been calibrated exceeds a certain threshold and whether it is in discharge mode (because the battery current in charging mode is a step-by-step constant current, the FFRLS algorithm is prone to divergence, so it is performed when the current fluctuates in discharge mode). For example, if the threshold is 5 days, and the battery has not been calibrated for more than 5 days, the FFRLS algorithm needs to be started.
[0160] Among them, the relevant parameters need to be initialized before the algorithm runs. For example, the initial battery impedance is set to 0, the initial OCV is set to the current battery terminal voltage (the closer to the actual value, the faster the convergence), and the initial covariance matrix is set as large as possible (such as 1e6), so that the results of the initial iteration are more reliable in the measured values.
[0161] S622: The OGALG module obtains the current battery voltage Ut(k) and battery current I(k); execute S623;
[0162] S623: OGALG module uses FFRLS algorithm to calculate OCV value;
[0163] S624: The OGALG module determines whether the difference between the OCV value and the battery voltage is greater than 0 and less than 100mv. If yes, execute S625; if no, execute S626;
[0164] S625: The OGALG module calculates the number of OCV values cumulatively count+1; execute S627;
[0165] S626: The cumulative number of OGALG modules is cleared; the execution returns to S622 after an interval of 5 seconds;
[0166] S627: OGALG module determines whether count is greater than 10 times. If yes, execute S628; if no, execute S622;
[0167] S628: The OGALG module calculates the standard deviation of ten OCV values; executes S629;
[0168] S629: OGALG module determines whether the deviation is less than 50mv. If yes, execute S630; if no, execute S626;
[0169] S630: The FFRLS algorithm is converged, the OGALG module clears the DOD uncalibrated days and sends the latest OCV value to the Kernel; execute S632;
[0170] The OCV value is calculated by the FFRLS algorithm, which is executed periodically every 5 seconds. The following operations are performed in the thread:
[0171] a. AIDL actively reads the Kernel node to obtain the battery voltage Ut(k) and battery current It(k) at the current time k;
[0172] b. Use phi(:,k)=[Ut(k-1),1,Il(k),Il(k-1)]' to update the state variables of the state space equation;
[0173] c. Use y_tidle(k) = (Ut(k) - theta(:, k-1)'*phi(:, k)) to calculate the measurement error;
[0174] d. Use L(:,k)=P*phi(:,k) / (lambda+phi(:,k)'*P*phi(:,k)) to calculate the Kalman gain;
[0175] e. Use P = (PL(:,k)*phi(:,k)'*P) / lambda to update the covariance matrix;
[0176] f. Use theta(:,k)=theta(:,k-1)+L(:,k)*y_tidle(k) to update the model parameters;
[0177] g. Use R0(1,k)=theta(3,k) to update the resistor R0;
[0178] h. Use OCV(k)=theta(1,k)*OCV(k-1)+theta(2,k) to calculate the estimated OCV value;
[0179] i. It will determine whether the estimated OCV(k) deviates too much from the battery terminal voltage Ut(k). The current setting is 100mv, which means that OCV(k) needs to be greater than Ut(k) and less than Ut(k)+100mv. If it is satisfied, the value of OCV(k) is stored, and the cumulative number of OCV calculations count is increased by 1.
[0180] When count>10 times, it is necessary to calculate the standard deviation of the OCV accumulated for ten times. The reason for calculating the standard deviation is that the values between the OCV calculated several times in a short period of time are stable, and they are considered valid only when there is not much deviation. The current deviation value is set to 50mv, that is, when deviation<50mv, it is considered that the FFRLS algorithm is converged. At this time, the DOD uncalibrated days on the AIDL side need to be cleared, and the latest calculated OCV value is sent to the Kernel.
[0181] In addition, AIDL determines whether the value of OCV is within a reasonable range. If it is reasonable, it will be sent to the Kernel. Otherwise, it will not be sent.
[0182] S631: Kernel monitors whether AIDL has sent down the OCV value of the battery, and executes S632;
[0183] S632: Kernel determines whether there is an action to be issued. If yes, execute S633;
[0184] S633: Kernel clears the DOD uncalibrated days, parses the battery OCV parameters sent by AIDL, and writes the OCV value calculated by AP to a specific address of the fuel gauge IC through the I2C bus. Then, AP writes a specific command code to the I2C bus, which can re-trigger the fuel gauge IC's power algorithm calculation; S634;
[0185] S634: The power meter IC monitors whether the AP has a special code written to trigger power calculation; execute S635;
[0186] S635: The power meter IC determines whether it has received the special code. If yes, execute S636; if no, execute S635;
[0187] S636: the power meter IC takes out the OCV value sent by the AP from its own specific OCV register and starts to use it to recalculate the power simulation; execute S637;
[0188] S637: The fuel gauge IC checks the OCV table temporarily stored in the firmware and performs linear interpolation to obtain the OCV mapping table D at the current charge and discharge cycle number (cycle) and current temperature, and finds the DOD closest to the OCV value of the AP in the mapping table D as the calibrated DOD.
[0189] It can be seen that the Kernel side will monitor whether AIDL has sent the current battery OCV value. If there is a sending action, the DOD uncalibrated days on the Kernel side will be cleared, and the battery OCV value sent by AIDL will be parsed. The OCV value calculated by the AP is written to the specific address of the power meter through the I2C bus, and then the AP side writes a specific command code through the I2C bus. The command code can re-trigger the power algorithm calculation of the power meter.
[0190] The power meter IC monitors whether the AP has written a special code to trigger power calculation. If so, the power meter IC takes out the OCV value sent by the AP from its own specific OCV register and starts to use it to recalculate the power simulation. It checks the multiple cycle and temperature OCV tables temporarily stored in the firmware, and performs linear interpolation to obtain the OCV mapping table D at the current cycle and temperature. It then finds the DOD closest to the AP's OCV in the mapping table D as the calibrated DOD. The specific operations are as follows:
[0191] For example, the preset cycles include: 200-400-600-1000, and the preset temperatures include: -10-0-10-25-50. There are 4*5=20 tables in total. The table format is as follows:
[0192] DOD\OCV(mv)\R(mΩ)
[0193] 0%,4401.9500,51.6
[0194] 1%,4358.8500,51.6
[0195] 2%,4058.8500,51.6 ...
[0197] 98%, 3078.6000, 25.23
[0198] 99%,3033.0000,27.06
[0199] 100%, 2987.4000, 28.88
[0200] (1) First, perform linear interpolation on the cycles of the five temperature segments: determine which two cycles the current cycle_x is between. Assuming it is between cycle_A and cycle_B, then
[0201] The calculation formula for a certain voltage in the OCV table of the current battery cycle is as follows:
[0202]
[0203] (2) Determine between which two temperatures in (1) the current temperature temp_x is. Assuming it is between temp_A and temp_B, the calculation formula for a voltage in the OCV table of the current battery temperature temp_x is as follows:
[0204]
[0205] (3) Determine between which two ocvs the current AP setting ocv_x is in (2). Assuming it is between ocv_A and ocv_B, the calculation formula for the dod corresponding to the current battery ocv_x is as follows:
[0206]
[0207] Figure 7 A schematic diagram of a curve of an optional battery pack terminal voltage and an estimated value of OCV provided in an embodiment of the present application, such as Figure 7 As shown, the variation trend between the terminal voltage and the estimated OCV is consistent.
[0208] It can be seen that this example can effectively calculate the reliable OCV value in real time on the mobile terminal: it can be seen that OCV basically follows the changing trend of the terminal voltage, and the accuracy is within the required range; this example can monitor the power calibration of the mobile terminal in real time. Once it is found that the power is not calibrated for a long time, the FFRLS algorithm is triggered to calculate the OCV value, and the calculated OCV value is sent to the power IC to trigger the linear interpolation calibration DOD at the IC level, which can avoid the problem of power jump caused by long-term non-calibration of the mobile terminal.
[0209] In this example, without considering the cost, the mechanism running on the AP can be moved to the firmware of the power meter IC, so that the power meter IC integrates the most comprehensive power calibration solution.
[0210] In summary, this example designs a solution based on real-time calibration of power in mobile terminals. This solution can effectively solve the problem of harsh power calibration conditions in current mobile terminals. By real-time monitoring of the power calibration status of mobile terminals, when it is found that the power is not calibrated for a long time, the FFRLS algorithm is triggered to identify the battery OCV online, and the calculated OCV is sent to the power meter IC to trigger the linear interpolation calibration DOD at the IC level, which can avoid the problem of power jump caused by long-term non-calibration of mobile terminals, greatly improving the user experience.
[0211] An embodiment of the present application provides a calibration method, in which, when the current number of days that the DOD of a battery pack of an electronic device has not been calibrated exceeds a preset number of days, an estimated value of the OCV of the battery pack is obtained, and the estimated value of the OCV and a command code for triggering calibration are written into a fuel gauge IC in the battery pack, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of the OCV; that is, in an embodiment of the present application, by obtaining an estimated value of the OCV of the battery pack when the current number of days that the DOD of the battery pack of the electronic device has not been calibrated exceeds a preset number of days, that is, when the DOD of the battery pack has not been calibrated for a long time, by obtaining an estimated value of the OCV, and writing the estimated value and a command code for triggering calibration into the fuel gauge IC, so that the fuel gauge IC calibrates the DOD of the battery pack to obtain the calibrated DOD, in this way, by obtaining an estimated value of the OCV when the DOD has not been calibrated for a long time, the DOD can be calibrated, thereby preventing the DOD from being calibrated for a long time, thereby improving the calibration efficiency.
[0212] Based on the same inventive concept as the above-mentioned embodiments, the present application embodiment provides a calibration device, Figure 8 A schematic diagram of the structure of an optional calibration device provided in an embodiment of the present application, such as Figure 8 As shown, the calibration device includes: an acquisition module 81 and a calibration module 82; wherein,
[0213] An acquisition module 81, configured to acquire an estimated value of the OCV of the battery pack when the current uncalibrated days of the DOD of the battery pack of the electronic device exceeds a preset number of days;
[0214] The calibration module 82 is used to write the estimated value of OCV and the command code for triggering calibration into the fuel gauge IC in the battery pack, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of OCV.
[0215] In an optional embodiment, the acquisition module 81 is specifically configured to:
[0216] When the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, an estimated value of the OCV of the battery pack is obtained.
[0217] In an optional embodiment, when the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, the acquisition module 81 acquires the estimated value of the OCV of the battery pack, including:
[0218] When the current uncalibrated days of the DOD of the battery pack exceeds the preset days and the electronic device is in a discharging state, the FFRLS algorithm is used to determine the estimated value of the OCV of the battery pack based on the acquired battery voltage of the battery pack and the acquired battery current of the battery pack.
[0219] In an optional embodiment, when the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, the acquisition module 81 uses the FFRLS algorithm to determine the estimated value of the OCV of the battery pack based on the acquired battery voltage of the battery pack and the acquired battery current of the battery pack, including:
[0220] When the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, obtaining the battery voltage and the battery current at every preset first time period through the application layer of the electronic device;
[0221] Determine an initial estimated value of the OCV of the battery pack by using the FFRLS algorithm based on the battery voltage and the battery current through the application layer until a preset number of initial estimated values are determined;
[0222] When the standard deviation of the preset number of initial estimated values is less than a preset threshold, the application layer determines the initial estimated value finally determined among the preset number of initial estimated values as the estimated value of the OCV of the battery pack.
[0223] In an optional embodiment, the device is also used for:
[0224] The current uncalibrated days and the current calibration parameters are obtained through the Kernel of the electronic device; wherein the current calibration parameters are parameters that change with the calibration of the fuel gauge IC;
[0225] Obtaining, by the Kernel, a verification and calibration parameter of the fuel gauge IC from the fuel gauge IC at every preset second time period;
[0226] When the current verification and calibration parameters are not equal to the verification and calibration parameters of the fuel gauge IC, the current uncalibrated days are set to 0 through the Kernel, and the current verification and calibration parameters are updated to the verification and calibration parameters of the fuel gauge IC;
[0227] When the current verification calibration parameter is equal to the verification calibration parameter of the fuel gauge IC, the value obtained by adding 1 to the current uncalibrated days is re-determined as the current uncalibrated days through the Kernel;
[0228] The current uncalibrated days and the current calibration parameters are sent to the application layer through the Kernel, and an update calibration instruction is sent to the application layer to update the current uncalibrated days and the current calibration parameters in the application layer.
[0229] In an optional embodiment, the calibration module 82 is specifically configured to:
[0230] When receiving the estimated OCV value of the battery pack from the application layer of the electronic device, the current uncalibrated days are set to 0 through the Kernel of the electronic device, and the estimated OCV value and the command code for triggering calibration are written to the fuel gauge IC, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated OCV value.
[0231] In an optional embodiment, obtaining the estimated value of the fuel gauge IC based on the OCV in the acquisition module 81 to obtain the DOD of the battery pack after calibration includes:
[0232] The fuel gauge IC obtains the current charge and discharge cycle number of the battery pack, the current temperature of the battery pack and a first corresponding relationship; wherein the first corresponding relationship is: the corresponding relationship between the OCV of the battery pack and the DOD of the battery pack at a preset charge and discharge cycle number and a preset temperature;
[0233] The fuel gauge IC determines the DOD corresponding to the estimated value of the OCV from the first corresponding relationship based on the current number of charge and discharge cycles and the current temperature, and determines the DOD corresponding to the estimated value of the OCV as the DOD after the battery pack is calibrated.
[0234] In an optional embodiment, the fuel gauge IC in the acquisition module 81 determines the DOD corresponding to the estimated value of the OCV from the first corresponding relationship based on the current number of discharge cycles and the current temperature, including:
[0235] In the case where the second corresponding relationship exists in the first corresponding relationship, the fuel gauge IC determines the DOD corresponding to the estimated value of the OCV from the second corresponding relationship; wherein the second corresponding relationship is: the corresponding relationship between the OCV of the battery pack and the DOD of the battery pack at the current number of discharge cycles and the current temperature, and the OCV in the second corresponding relationship includes the estimated value of the OCV;
[0236] When the second corresponding relationship does not exist in the first corresponding relationship, the fuel gauge IC determines the second corresponding relationship based on the first corresponding relationship by using an interpolation method;
[0237] The fuel gauge IC determines the DOD corresponding to the estimated value of OCV from the second corresponding relationship.
[0238] In practical applications, the acquisition module 81 and the calibration module 82 can be implemented by a processor located on the calibration device, specifically a CPU, a microprocessor (Microprocessor Unit, MPU), a digital signal processor (Digital Signal Processing, DSP) or a field programmable gate array (Field Programmable Gate Array, FPGA) and the like.
[0239] Fig. 9 A schematic diagram of the structure of an optional electronic device provided in an embodiment of the present application, such as Fig. 9 As shown, an embodiment of the present application provides an electronic device 900, and the electronic device 900 includes:
[0240] A memory 91, used for storing computer programs;
[0241] A processor 92, connected to the memory 91, and configured to call and run the computer program from the memory 91 to implement the method described in one or more of the above embodiments;
[0242] The transceiver 93 is used for sending and receiving information during the process of sending and receiving information between other devices.
[0243] It should be noted that in actual application, the various components in the computer device are coupled together through a communication bus. It can be understood that the communication bus is used to realize the connection and communication between these components. In addition to the data bus, the communication bus also includes a power bus, a control bus and a status signal bus.
[0244] The embodiment of the present application provides a chip, Fig.10 A schematic diagram of the structure of an optional chip provided in an embodiment of the present application, such as Fig.10 As shown, the embodiment of the present application provides a chip 1000, and the chip 1000 includes:
[0245] The processor 101 is used to call and run a computer program from a memory so that a device equipped with the chip executes the method described in one or more of the above embodiments;
[0246] The transceiver 102 is used for sending and receiving information during the process of sending and receiving information between the device or chip.
[0247] Among them, the computer-readable storage medium can be a ferromagnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM) and other memories.
[0248] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0249] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0250] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0251] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0252] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application.
Claims
1. A calibration method, characterized in that: The method is applied to an electronic device, comprising: When the current uncalibrated days of the DOD of the battery pack of the electronic device exceeds a preset number of days, obtaining an estimated value of the OCV of the battery pack; The estimated value of the OCV and a command code for triggering calibration are written into a fuel gauge IC in the battery pack, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of the OCV.
2. The method according to claim 1, characterized in that: The obtaining, when the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days, an estimated value of the OCV of the battery pack includes: When the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, an estimated value of the OCV of the battery pack is obtained.
3. The method according to claim 2, characterized in that The obtaining an estimated value of the OCV of the battery pack when the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state includes: When the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, the FFRLS algorithm is used to determine an estimated value of the OCV of the battery pack based on the acquired battery voltage of the battery pack and the acquired battery current of the battery pack.
4. The method according to claim 3, characterized in that When the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, based on the acquired battery voltage of the battery pack and the acquired battery current of the battery pack, an estimated value of the OCV of the battery pack is determined by using an FFRLS algorithm, including: When the current uncalibrated days of the DOD of the battery pack exceeds a preset number of days and the electronic device is in a discharging state, obtaining the battery voltage and the battery current at every preset first time period through the application layer of the electronic device; Determine, by the application layer, an initial estimated value of the OCV of the battery pack using an FFRLS algorithm based on the battery voltage and the battery current, until a preset number of initial estimated values are determined; When the standard deviation of the preset number of initial estimated values is less than a preset threshold, the application layer determines the last determined initial estimated value among the preset number of initial estimated values as the estimated value of the OCV of the battery pack.
5. The method according to claim 4, characterized in that The method further comprises: Acquiring the current uncalibrated days and the current calibration parameter through the Kernel of the electronic device; wherein the current calibration parameter is a parameter that changes with the calibration of the fuel gauge IC; Obtaining, by the Kernel, a verification and calibration parameter of the fuel gauge IC from the fuel gauge IC at every preset second time period; When the current verification calibration parameter is not equal to the verification calibration parameter of the electric power meter IC, the current uncalibrated days are set to 0 through the Kernel, and the current verification calibration parameter is updated to the verification calibration parameter of the electric power meter IC; In the case that the current verification calibration parameter is equal to the verification calibration parameter of the electricity meter IC, a value obtained by adding 1 to the current uncalibrated days is re-determined as the current uncalibrated days by the Kernel; The current uncalibrated days and the current calibration verification parameters are sent to the application layer through the Kernel, and an update calibration instruction is sent to the application layer to update the current uncalibrated days and the current calibration verification parameters in the application layer.
6. The method according to any one of claims 1 to 5, characterized in that: The step of writing the estimated value of the OCV and a command code for triggering calibration into a fuel gauge IC in a battery pack of the electronic device, so that the fuel gauge IC obtains a DOD of the battery pack after calibration based on the estimated value of the OCV, comprises: When receiving the estimated value of the OCV of the battery pack from the application layer of the electronic device, the current number of uncalibrated days is set to 0 through the Kernel of the electronic device, and the estimated value of the OCV and the command code for triggering calibration are written into the fuel gauge IC, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of the OCV.
7. The method according to claim 6, characterized in that The fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of the OCV, including: The fuel gauge IC obtains the current charge and discharge cycle number of the battery pack, the current temperature of the battery pack and a first corresponding relationship; wherein the first corresponding relationship is: the corresponding relationship between the OCV of the battery pack and the DOD of the battery pack at a preset charge and discharge cycle number and a preset temperature; The fuel gauge IC determines the DOD corresponding to the estimated value of the OCV from the first corresponding relationship based on the current number of charge and discharge cycles and the current temperature, and determines the DOD corresponding to the estimated value of the OCV as the DOD of the battery pack after calibration.
8. The method according to claim 7, characterized in that The fuel gauge IC determines the DOD corresponding to the estimated value of the OCV from the first corresponding relationship based on the current number of discharge cycles and the current temperature, including: In the case where a second corresponding relationship exists in the first corresponding relationship, the fuel gauge IC determines the DOD corresponding to the estimated value of the OCV from the second corresponding relationship; wherein the second corresponding relationship is: the corresponding relationship between the OCV of the battery pack at the current number of discharge cycles and the current temperature and the DOD of the battery pack, and the OCV in the second corresponding relationship includes the estimated value of the OCV; In the case that the second corresponding relationship does not exist in the first corresponding relationship, the electricity meter IC determines the second corresponding relationship based on the first corresponding relationship by using an interpolation method; The fuel gauge IC determines the DOD corresponding to the estimated value of the OCV from the second corresponding relationship.
9. A calibration device, characterized in that: The device is arranged in an electronic device and comprises: an acquisition module, configured to acquire an estimated value of the OCV of the battery pack when the current uncalibrated days of the DOD of the battery pack of the electronic device exceeds a preset number of days; The calibration module is used to write the estimated value of the OCV and a command code for triggering calibration into the fuel gauge IC in the battery pack, so that the fuel gauge IC obtains the DOD of the battery pack after calibration based on the estimated value of the OCV.
10. An electronic device, comprising: Memory for storing computer programs; A processor, connected to the memory, and configured to call and run the computer program from the memory to implement the method according to any one of claims 1 to 8; A transceiver is used to send and receive information during the process of sending and receiving information between other devices.
11. A chip, comprising: A processor, configured to call and run a computer program from a memory so that a device equipped with the chip executes the method according to any one of claims 1 to 8; A transceiver is used to send and receive information during the process of sending and receiving information between a device or chip.