Electric quantity display method and device, equipment and storage medium
By adjusting the cutoff voltage of the terminal equipment battery meter, the problem of inaccurate calibration of the battery meter in the prior art is solved, and the accurate display of the power of the terminal equipment and the avoidance of the power jump are achieved.
Patent Information
- Application Number
- CN202510120834.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-24
- Publication Date
- 2025-05-06
AI Technical Summary
In the prior art, calibration methods of the battery meter such as the Kulun integral accumulation algorithm will cause large errors over time, resulting in inaccurate calibration of the battery meter, which will affect the accurate display of the battery capacity of the terminal equipment.
By determining the first open circuit voltage according to the battery parameters of the terminal device, and adjusting the cutoff voltage of the battery meter in combination with the second open circuit voltage detected by the battery meter, the adjusted cutoff voltage is obtained, and the power of the terminal device is displayed based on this.
More accurate calibration of terminal equipment battery meter is achieved, ensuring that terminal equipment can accurately display the current battery power of the battery and avoid the battery power jump.
Smart Images

Figure CN119936657A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to power detection technology, and relate to but are not limited to a method and apparatus, device, and storage medium for displaying power. Background Art
[0002] When a terminal device is in use, it is usually necessary to display its own power in real time. In order to display the power more accurately, it is usually necessary to calibrate the power meter of the terminal device.
[0003] In the related art, the calibration method of the electricity meter is a Coulomb integral accumulation algorithm, which will produce large errors over time, resulting in inaccurate calibration of the electricity meter. Therefore, a method that can ensure accurate calibration of the electricity meter is urgently needed. Summary of the invention
[0004] In view of this, the method, device, equipment, and storage medium for displaying the power provided in the embodiments of the present application can more accurately calibrate the power meter of the terminal device, so that the terminal device can more accurately display the current power of the battery and avoid jumps in the battery power. The method, device, equipment, and storage medium for displaying the power provided in the embodiments of the present application are implemented as follows:
[0005] In one aspect of an embodiment of the present application, a method for displaying power is provided, comprising:
[0006] Determine a first open circuit voltage of a battery of the terminal device according to a battery parameter of the terminal device, where the battery parameter is used to characterize battery circuit information of the terminal device;
[0007] Adjusting a cutoff voltage of a power meter of the terminal device based on the first open circuit voltage and a second open circuit voltage detected by a power meter of the battery to obtain an adjusted cutoff voltage;
[0008] The power level of the terminal device is displayed according to the adjusted cut-off voltage.
[0009] In another aspect of the embodiment of the present application, there is also provided a power display device, comprising: a parameter determination module, a voltage adjustment module and a power display module;
[0010] A parameter determination module, used to determine a first open circuit voltage of a battery of the terminal device according to a battery parameter of the terminal device, where the battery parameter is used to characterize battery circuit information of the terminal device;
[0011] A voltage adjustment module, configured to adjust a cutoff voltage of a power meter of a terminal device based on the first open circuit voltage and a second open circuit voltage detected by a power meter of the battery, to obtain an adjusted cutoff voltage;
[0012] The power display module is used to display the power of the terminal device according to the adjusted cut-off voltage.
[0013] The computer device provided in the embodiment of the present application includes a memory and a processor. The memory stores a computer program that can be run on the processor. When the processor executes the program, the method of the embodiment of the present application is implemented.
[0014] The computer-readable storage medium provided in the embodiment of the present application has a computer program stored thereon, and when the computer program is executed by a processor, the method provided in the embodiment of the present application is implemented.
[0015] In the method, device, equipment, and storage medium for displaying the power provided in the embodiments of the present application, the first open circuit voltage of the battery of the terminal device can be determined according to the battery parameters of the terminal device, and the battery parameters are used to characterize the battery circuit information of the terminal device; the cutoff voltage of the power meter of the terminal device is adjusted based on the first open circuit voltage and the second open circuit voltage detected by the battery power meter to obtain the adjusted cutoff voltage; and the power of the terminal device is displayed according to the adjusted cutoff voltage. Among them, the cutoff voltage of the power meter can be adjusted more accurately through the battery parameters, so that the cutoff voltage of the power meter is more accurate and reasonable, and then the power meter of the terminal device can be calibrated, so that the terminal device can more accurately display the current power of the battery and avoid jumps in the battery power. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0017] Figure 1 A schematic diagram of an application scenario provided in an embodiment of the present application;
[0018] Figure 2 A schematic diagram of a battery equivalent circuit of a terminal device provided in an embodiment of the present application;
[0019] Figure 3 A schematic diagram of a flow chart of a method for displaying power provided in an embodiment of the present application;
[0020] Figure 4 A schematic diagram of a process for adjusting the cut-off voltage provided in an embodiment of the present application;
[0021] Figure 5 A schematic diagram of a flow chart for determining a compensation voltage provided in an embodiment of the present application;
[0022] Figure 6A schematic diagram of a process for determining a target mapping relationship provided in an embodiment of the present application;
[0023] Figure 7 Another schematic diagram of a process for adjusting the cut-off voltage provided in an embodiment of the present application;
[0024] Figure 8 A schematic diagram of a process for obtaining battery parameters provided in an embodiment of the present application;
[0025] Fig. 9 Another schematic diagram of a process for obtaining battery parameters provided in an embodiment of the present application;
[0026] Fig.10 A schematic diagram of a process for determining whether battery parameters are valid provided in an embodiment of the present application;
[0027] Fig.11 A schematic diagram of a flow chart for determining whether a battery voltage and a battery current are synchronous data provided in an embodiment of the present application;
[0028] Fig.12 Another schematic diagram of a flow chart for determining a compensation voltage provided in an embodiment of the present application;
[0029] Fig.13 This is a schematic diagram of the overall process of obtaining battery parameters provided in an embodiment of the present application;
[0030] Fig.14 A schematic diagram of the overall process of identifying battery parameters provided in an embodiment of the present application;
[0031] Fig.15 A schematic diagram of the overall process of determining the compensation voltage provided in an embodiment of the present application;
[0032] Fig.16 A schematic diagram of a process for determining a cut-off voltage of a core provided in an embodiment of the present application;
[0033] Fig.17 A schematic diagram of the structure of a device for displaying electric quantity provided in an embodiment of the present application;
[0034] Fig.18 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the specific technical solution of the present application will be further described in detail below in conjunction with the drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application, but are not used to limit the scope of the present application.
[0036] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0037] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0038] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present application are used to distinguish similar or different objects, and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present application described here can be implemented in an order other than that illustrated or described here.
[0039] In order to more clearly explain the method for displaying power provided in the embodiment of the present application, the application scenarios corresponding to the embodiment of the present application are explained below.
[0040] Figure 1 This is a schematic diagram of the application scenario provided in the embodiment of this application, please refer to Figure 1 , the scenario may include: terminal device 100, wherein the terminal device 100 may include but is not limited to mobile phones, wearable devices (such as smart watches, smart bracelets, smart glasses, etc.), tablet computers, laptops, vehicle terminals, PCs (Personal Computers), etc. The functions implemented by the method can be implemented by calling program codes by the processor in the terminal device 100, and of course the program codes can be stored in a computer storage medium. It can be seen that the terminal device 100 at least includes a processor and a storage medium.
[0041] In one embodiment, the terminal device 100 may be a device having a display, and the display may display the power level of the terminal device. Figure 1 The power level of the terminal device shown in is the power level of the battery of the terminal device. The power level can be displayed, for example, as a percentage, or can also be displayed in an image-illustrated manner, which is not specifically limited here.
[0042] It should be noted that when using a terminal device, the user usually needs to understand the power consumption of the terminal device in real time through the power displayed by the terminal device. If the power displayed by the terminal device is inaccurate, there may be power jumps, etc., which will cause the user to feel that the power consumption of the terminal device is abnormal, thereby affecting the user's experience of using the terminal device. In order to make the power displayed by the terminal device more accurate, it is necessary to calibrate the power displayed by the terminal device, specifically, calibrate the power meter of the terminal device.
[0043] The calibration method used in the related art is to use a standby static table lookup combined with a coulomb integration scheme to realize the power calibration of the power meter. However, in actual application, the terminal device may be in use for a long time. In this case, only the coulomb integration scheme can be used to calibrate the power meter. However, long-term use of the coulomb integration scheme will produce errors, which leads to poor calibration results of the power meter. There may be power jumps and the like, which will further lead to the terminal power of the battery being not durable and the terminal device having poor endurance.
[0044] In order to solve the above problems existing in the related art, a method for displaying power is provided in an embodiment of the present application. The actual application of the method for displaying power is explained below.
[0045] Figure 2 This is a schematic diagram of the battery equivalent circuit of the terminal device provided in the embodiment of the present application. Please refer to Figure 2 , Figure 2 It is the first-order equivalent circuit model of the battery of the terminal equipment.
[0046] Among them, Figure 2 In the first-order equivalent circuit model in, the ohmic resistance Ro is used to represent the resistance of the battery component as the charge in the double layer accumulates and dissipates, and the RC network is used to simulate the diffusion voltage. The slow voltage change trend of the diffusion voltage is due to the slow diffusion of lithium ions in the battery, which makes the electrode ion concentration unbalanced, and then leads to polarization. Rp and Cp are respectively called diffusion resistance and diffusion capacitance. According to the circuit principle, the electrical behavior of the first-order equivalent circuit model can be written in discrete time form:
[0047]
[0048] Among them, Up refers to the diffusion voltage, k is a number of discrete times, ΔT is the time interval between two adjacent discrete times, Rp is the resistance of the diffusion resistor, Cp is the capacitance of the diffusion capacitor, I is the current in the entire first-order equivalent circuit model, Ut is the terminal voltage of the terminal device, Uocv is the open circuit voltage of the terminal device, and Ro is the resistance of the ohmic resistor.
[0049] It should be noted that the dynamic voltage can be defined as:
[0050] U e (k) = U t (k)-U ocv (k) = U P (K)+R O I(k);
[0051] Among them, Ue is the dynamic voltage that changes in the terminal equipment.
[0052] Arranging the above formulas yields:
[0053]
[0054] Substituting the expression of dynamic voltage into the expression of terminal voltage, we can get:
[0055]
[0056]
[0057] Quantity θ k ,vector It can be expressed in the following ways:
[0058]
[0059] According to the above formula, the following formula can be obtained:
[0060] θ k (3) = (1-θ k (4))U ocv =U ocv -θ k (4)U ocv ;
[0061] U ocv =θ k (4)U ocv +θ k (3);
[0062] U ocv (k) = θ k (4)U ocv (k-1)+θ k (3);
[0063] Based on the above formula, it can be determined that in the calculation process, as long as the parameter identification estimates θ in real time k (3) θ k (4) can be obtained by the open circuit voltage U ocv (k-1), iteratively estimate the open circuit voltage U at that momentocv (k) In order to enhance the response and adaptability of OCV parameter identification to dynamic conditions, a recursive least squares formula with a forgetting factor can also be introduced:
[0064]
[0065] Among them, P and K are two coefficients, λ is the forgetting factor, It can be one of the aforementioned model identification vectors.
[0066] It should be noted that the recursive operation can be performed by using the recursive least squares method, where the recursive least squares method is a recursive algorithm used to solve linear regression problems, and its goal is to estimate system parameters by minimizing the sum of squares of errors. The recursive least squares method with forgetting factor introduces a forgetting factor on the basis of the standard least squares method, so that new data has a greater weight than old data, thereby speeding up the response to parameter changes.
[0067] In one embodiment, the forgetting factor λ can be 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 (for example: 0.95) is better, which can forget old data faster and adapt to new data more quickly, thereby better tracking the dynamic changes of the system. Therefore, the parameter identification algorithm can be used to predict the open circuit voltage of the battery in real time, thereby guiding the update of the battery power of the terminal device.
[0068] In the embodiment provided in the present application, a calculation model can be established based on the above-mentioned recursive least square method with forgetting factor, for example: an open circuit voltage calculation model, through which the open circuit voltage calculation model can be used to more accurately calculate the open circuit voltage U at each moment. ocv (k).
[0069] The following is an explanation of the implementation process of the method for displaying the power amount provided in the embodiment of the present application.
[0070] Figure 3 Please refer to the flowchart of the method for displaying the power provided in the embodiment of the present application. Figure 3 , the method of displaying the power includes:
[0071] S310: Determine a first open circuit voltage of a battery of the terminal device according to battery parameters of the terminal device.
[0072] It should be noted that the execution subject of the method may be the above-mentioned terminal device, wherein the battery parameters are used to characterize the battery circuit information of the terminal device.
[0073] For example, battery parameters may be information such as current and voltage in a battery circuit.
[0074] In one embodiment, the first open circuit voltage may be an open circuit voltage determined by battery parameters, for example, Figure 2 Uocv in.
[0075] It should be noted that the first open circuit voltage can be calculated by obtaining the parameters required in the above formula and using the above recursive least square method with forgetting factor.
[0076] It should be noted that the open circuit voltage refers to the terminal voltage of the battery in the open circuit state, that is, Figure 2 Uocv in the figure, correspondingly, the terminal voltage of the battery in the working state can be Figure 2 Ut in.
[0077] S320: Adjusting a cutoff voltage of the power meter of the terminal device based on the first open circuit voltage and a second open circuit voltage detected by the power meter of the battery to obtain an adjusted cutoff voltage.
[0078] In actual application, the open circuit voltage can be obtained in a variety of ways, for example, it can be calculated through the above-mentioned battery parameters, or it can be detected by a fuel meter. In order to distinguish the open circuit voltages obtained in different ways, the open circuit voltage calculated by the battery parameters can be used as the first open circuit voltage, and the open circuit voltage detected by the fuel meter can be used as the second open circuit voltage.
[0079] In one embodiment, the cutoff voltage of the fuel gauge may be adjusted according to the first open circuit voltage and the second open circuit voltage.
[0080] It should be noted that the cut-off voltage of the fuel gauge refers to the voltage value when the fuel gauge considers the battery to be exhausted during the discharge process. This voltage value is not the over-discharge protection voltage of the battery, but a reference point used by the fuel gauge to calculate and report the battery power. For example, if the cut-off voltage is 3.7V, the battery can be determined to be exhausted when the battery voltage drops to 3.7V; if the cut-off voltage is adjusted, for example, raised to 4V, the battery will be determined to be exhausted when the battery voltage drops to 4V.
[0081] Optionally, in the process of adjusting the cut-off voltage, the adjustment of the cut-off voltage can be determined based on the difference between the first open-circuit voltage and the second open-circuit voltage. For example, the cut-off voltage can be increased, or the cut-off voltage can be decreased. There is no specific limitation here. The increase and decrease of the cut-off voltage can be determined based on the comparison result between the first open-circuit voltage and the second open-circuit voltage.
[0082] For example: if the first open circuit voltage is greater than the second open circuit voltage, the cut-off voltage can be reduced, and if the first open circuit voltage is less than the second open circuit voltage, the cut-off voltage can be increased. It should be noted that this adjustment method is only an example, and in actual application, the adjustment value of the cut-off voltage can also be determined according to the specific difference, and no specific limitation is made here.
[0083] S330: Display the power level of the terminal device according to the adjusted cut-off voltage.
[0084] It should be noted that after the cut-off voltage of the electricity meter of the terminal device is adjusted, the electricity level of the terminal device can be displayed according to the adjusted cut-off voltage.
[0085] There is a certain correspondence between the open circuit voltage of the battery and the remaining power of the battery. It is usually necessary to establish the OCV-SOC function relationship through experimental data fitting. Among them, OCV is the open circuit voltage and SOC is the battery power of the terminal device.
[0086] During the discharge process, when the battery voltage drops to the cut-off voltage, it can be considered that the SOC is close to 0%. By adjusting the cut-off voltage, the functional relationship of OCV-SOC can be changed, so that the power of the terminal device can be displayed according to the changed functional relationship.
[0087] For example: after the cut-off voltage is changed, the displayed power will also change due to the change of the cut-off voltage. For example: if the cut-off voltage is increased, the displayed power will be lower than the original power; if the cut-off voltage is reduced, the displayed power will be higher than the original power.
[0088] In addition, after adjusting the cut-off voltage, the battery power change process will be smoother and there will be no voltage jump.
[0089] In the method for displaying the power level provided in the embodiment of the present application, the first open circuit voltage of the battery of the terminal device can be determined according to the battery parameters of the terminal device, and the battery parameters are used to characterize the battery circuit information of the terminal device; the cut-off voltage of the power meter of the terminal device is adjusted based on the first open circuit voltage and the second open circuit voltage detected by the battery power meter to obtain the adjusted cut-off voltage; and the power level of the terminal device is displayed according to the adjusted cut-off voltage. Among them, the cut-off voltage of the power meter can be adjusted more accurately through the battery parameters, so that the cut-off voltage of the power meter is more accurate and reasonable, and then the power meter of the terminal device can be calibrated, so that the terminal device can more accurately display the current power level of the battery and avoid jumps in the battery power level.
[0090] The following is an explanation of one feasible implementation process of adjusting the cut-off voltage provided in the embodiment of the present application.
[0091] Figure 4 Please refer to the flowchart of adjusting the cut-off voltage provided in the embodiment of the present application. Figure 4 , adjusting a cutoff voltage of a power meter of a terminal device based on the first open circuit voltage and a second open circuit voltage detected by a power meter of a battery to obtain an adjusted cutoff voltage, comprising:
[0092] S410: Determine a compensation voltage according to a voltage difference between the second open circuit voltage and the first open circuit voltage.
[0093] It should be noted that, in the actual implementation process, after obtaining the first open circuit voltage and the second open circuit voltage, a compensation voltage can be determined according to the voltage difference between the second open circuit voltage and the first open circuit voltage, wherein the calculation formula of the compensation voltage is specifically as follows:
[0094] detal_vterm=gauge_ocv-est_ocv;
[0095] Wherein, detal_vterm is the compensation voltage, est_ocv is the first open circuit voltage, and gauge_ocv is the second open circuit voltage.
[0096] In one embodiment, the compensation voltage may be the value of the second open circuit voltage minus the first open circuit voltage. It should be noted that in practical applications, the difference may be used as the compensation voltage, or the difference may be further processed as the compensation voltage, for example, the maximum and minimum values may be limited and then used as the compensation voltage.
[0097] S420: Adjusting a cutoff voltage of an electricity meter of the terminal device based on the compensation voltage to obtain an adjusted cutoff voltage.
[0098] It should be noted that after obtaining the compensation voltage, the cutoff voltage of the electricity meter of the terminal device can be adjusted based on the compensation voltage. For example, if the compensation voltage is positive, the cutoff voltage can be increased; if the compensation voltage is negative, the cutoff voltage can be reduced.
[0099] For example, if the cut-off voltage is 3.7V and the compensation voltage is 0.1V, the adjusted cut-off voltage may be the original cut-off voltage plus the compensation voltage, that is, 3.8V.
[0100] It should be noted that, during the process of adjusting the cut-off voltage, the determined compensation voltage may be sent to a kernel of the terminal device, and the kernel may perform the adjustment of the cut-off voltage.
[0101] In the method for displaying the amount of electricity provided in the embodiment of the present application, the compensation voltage can be determined according to the voltage difference between the first open circuit voltage and the second open circuit voltage; the cut-off voltage of the electricity meter of the terminal device is adjusted based on the compensation voltage to obtain the adjusted cut-off voltage. The compensation voltage can be obtained more accurately by the difference between the first open circuit voltage and the second open circuit voltage, and then the cut-off voltage is compensated based on the compensation voltage, which can improve the accuracy of the adjusted cut-off voltage.
[0102] In one embodiment, before determining the compensation voltage according to the voltage difference between the second open circuit voltage and the first open circuit voltage, the method further includes: determining a first discharge depth of the battery according to the first open circuit voltage and a mapping relationship between the open circuit voltage and the discharge depth.
[0103] It should be noted that a plurality of mapping relationships between open circuit voltage (OCV) and depth of discharge (DOD) may be pre-stored in the terminal device, and the depth of discharge corresponding to the open circuit voltage may be determined by searching the mapping relationship.
[0104] After the first open circuit voltage is obtained, the first discharge depth corresponding to the first open circuit voltage can be determined according to the mapping relationship. Correspondingly, the second discharge depth corresponding to the second open circuit voltage can also be determined according to the mapping relationship, which is not specifically limited here.
[0105] The discharge depth may be used to indicate the discharge status of the battery of the terminal device. For example, the higher the discharge depth, the lower the remaining power of the terminal device. Correspondingly, the lower the discharge depth, the higher the remaining power of the terminal device.
[0106] It should be noted that the first discharge depth can be obtained based on the first open circuit voltage and the above mapping relationship; the second discharge depth can be detected by the power meter, or can also be obtained through the second open circuit voltage and the above mapping relationship, without specific limitation here.
[0107] Correspondingly, determining the compensation voltage according to the voltage difference between the second open circuit voltage and the first open circuit voltage includes: when the absolute value of the difference between the first discharge depth and the second discharge depth detected by the power meter is greater than a preset discharge depth threshold, determining the compensation voltage according to the voltage difference between the second open circuit voltage and the first open circuit voltage.
[0108] It should be noted that after obtaining the first discharge depth and the second discharge depth, the absolute value of the difference between the first discharge depth and the second discharge depth can be compared. The specific formula is as follows:
[0109] detal_dod=|est_dod-gauge_dod|;
[0110] Here, detal_dod may be the absolute value of the difference between the first depth of discharge and the second depth of discharge, est_dod is the first depth of discharge, and gauge_dod is the second depth of discharge.
[0111] A preset discharge depth threshold value may be set, for example, 10%. When the absolute value of the difference between the first discharge depth and the second discharge depth is greater than the preset discharge depth threshold value, it may be determined that the first discharge depth and the second discharge depth differ greatly, and the fuel gauge needs to be calibrated. The compensation voltage may be determined based on the voltage difference between the second open circuit voltage and the first open circuit voltage. When the absolute value of the difference between the first discharge depth and the second discharge depth is less than or equal to the preset discharge depth threshold value, it may be determined that the first discharge depth and the second discharge depth differ slightly, and the fuel gauge does not need to be calibrated, that is, the compensation voltage does not need to be calculated.
[0112] In one embodiment, another discharge depth threshold may be set, for example, 5%. When detal_dod<5 and detal_vterm>0, it can be determined that the cutoff voltage has been adjusted and the error is gradually decreasing. When the error is less than 5%, the cutoff voltage will no longer be compensated, and the compensation voltage will be forced to be set to 0 and sent to the kernel.
[0113] When none of the above conditions are met, it can be determined that the difference between the first discharge depth corresponding to the open circuit voltage identified by the online parameters and the second discharge depth calculated by the fuel gauge is relatively small, and no compensation action is performed at this time.
[0114] In the method for displaying the electric quantity provided in the embodiment of the present application, the first discharge depth of the battery can be determined according to the first open circuit voltage and the mapping relationship between the open circuit voltage and the discharge depth; when the absolute value of the difference between the first discharge depth and the second discharge depth detected by the electric meter is greater than the preset discharge depth threshold, the compensation voltage is determined according to the voltage difference between the second open circuit voltage and the first open circuit voltage. Among them, the discharge depth corresponding to the open circuit voltage can be obtained more accurately through the mapping relationship, and then based on the comparison of the discharge depth, it can be determined whether the electric meter needs to make a compensation adjustment for the cut-off voltage, so as to adjust the cut-off voltage more accurately and appropriately.
[0115] One feasible implementation process of determining the compensation voltage during the process of adjusting the cut-off voltage is explained below.
[0116] Figure 5 Please refer to the flowchart of determining the compensation voltage provided in the embodiment of the present application. Figure 5 , determining a compensation voltage according to a voltage difference between the second open circuit voltage and the first open circuit voltage, comprising:
[0117] S510: When the difference between the second open circuit voltage and the first open circuit voltage is greater than or equal to the first voltage threshold, determine that the compensation voltage is a preset first compensation voltage.
[0118] It should be noted that the first voltage threshold can be set according to actual needs, for example, it can be set to 0.1V. When the difference between the second open-circuit voltage and the first open-circuit voltage is greater than or equal to the first voltage threshold, the compensation voltage can be set to a preset first compensation voltage, for example, it can also be 0.1V.
[0119] S520: When the difference between the second open circuit voltage and the first open circuit voltage is less than or equal to the second voltage threshold, determine that the compensation voltage is a preset second compensation voltage.
[0120] The second compensation voltage is smaller than the first compensation voltage.
[0121] It should be noted that the second voltage threshold can be set according to actual needs, for example, it can be set to -0.1V. When the difference between the second open-circuit voltage and the first open-circuit voltage is less than or equal to the second voltage threshold, the compensation voltage can be set to a preset second compensation voltage, for example, it can also be -0.1V.
[0122] S530: When the difference between the second open circuit voltage and the first open circuit voltage is smaller than the first voltage threshold and larger than the second voltage threshold, determine the compensation voltage as the voltage difference between the second open circuit voltage and the first open circuit voltage.
[0123] It should be noted that, when the difference is between the first voltage threshold and the second voltage threshold, the difference can be used as the compensation voltage.
[0124] For example, if the difference is between -0.1V and 1V, the compensation voltage is the difference, that is, the calculation result of the above formula: detal_vterm=gauge_ocv-est_ocv.
[0125] In one embodiment, the magnitude of the compensation voltage can be limited by the first voltage threshold and the second voltage threshold, so as to obtain a compensation voltage within a fixed threshold interval, thereby preventing the compensation voltage from being too large or too small.
[0126] For example, if the difference between the second open circuit voltage and the first open circuit voltage is between -0.1V and 0.1V, the compensation voltage is the difference; if it exceeds 0.1V, the compensation voltage is 0.1V; if it is less than -0.1V, the compensation voltage is -0.1V.
[0127] In one embodiment, if the cutoff voltage needs to be compensated, the compensation voltage determined in the above method can be sent to the kernel of the terminal device. If the compensation of the cutoff voltage needs to be stopped, the compensation voltage can be set to 0 and then sent to the kernel of the terminal device.
[0128] In the kernel, the fuel gauge is polled every 10 seconds to see if it is calibrated. Once the second discharge depth of the calibrated fuel gauge is close to the predicted first discharge depth, there is no need to compensate the cut-off voltage. Therefore, it is determined whether it is calibrated. If it is calibrated, the received compensation voltage is set to 0; if it is not calibrated, the current compensation voltage remains unchanged. When the current cut-off voltage is different from the required cut-off voltage, the cut-off voltage setting mechanism is triggered. The compensation voltage is superimposed on the calculation of the original kernel cut-off voltage and set to the relevant cut-off voltage register of the fuel gauge. Then the cut-off voltage is updated and the next cycle of polling continues.
[0129] In the method for displaying the amount of electricity provided in the embodiment of the present application, when the difference between the second open-circuit voltage and the first open-circuit voltage is greater than or equal to the first voltage threshold, the compensation voltage can be determined to be the preset first compensation voltage; when the difference between the second open-circuit voltage and the first open-circuit voltage is less than or equal to the second voltage threshold, the compensation voltage can be determined to be the preset second compensation voltage; when the difference between the second open-circuit voltage and the first open-circuit voltage is less than the first voltage threshold and greater than the second voltage threshold, the compensation voltage can be determined to be the voltage difference between the second open-circuit voltage and the first open-circuit voltage. Among them, by setting the first compensation voltage and the second compensation voltage, the compensation voltage can be limited to avoid the compensation voltage being too large or too small, so that the compensation voltage is maintained within a certain range, and the accuracy and rationality of the cut-off voltage adjustment are guaranteed.
[0130] It should be noted that, for the above mapping relationships, multiple groups of mapping relationships may be stored in the terminal device, and the target mapping relationship used by the first open circuit voltage may be determined according to whether the corresponding mapping relationship is stored in the terminal device.
[0131] In one embodiment, the mapping relationship includes multiple groups, and each group of mapping relationships is a mapping relationship under different battery temperatures and / or different battery charge and discharge times.
[0132] For example: a plurality of groups of mapping relationships may be stored in the terminal device, and each group of mapping relationships is used to represent mapping conditions of different battery temperatures and / or different battery charge and discharge times.
[0133] It should be noted that at different temperatures, the mapping relationship between the open circuit voltage of the battery and the depth of discharge of the battery is different, indicating that the amount of electricity that the battery can discharge is different; and different numbers of charge and discharge cycles represent the degree of battery aging. The higher the number of charge and discharge cycles, the more serious the battery aging is, and the less electricity it can discharge. Therefore, the above mapping relationship will also change accordingly.
[0134] For example, mapping relationships at five temperatures of -10°C, 0°C, 10°C, 25°C and 50°C can be stored in the terminal device. Each temperature can also include different battery charge and discharge cycle numbers, for example: 0 times, 400 times, 600 times, 800 times, etc. For each temperature, mapping relationships under multiple different discharge times can be set.
[0135] For example, a total of 20 mapping relationships of 4 battery charge and discharge cycle numbers corresponding to each temperature under the above 5 temperatures can be set, and then a target mapping relationship can be determined based on these multiple mapping relationships, and the first discharge depth corresponding to the first open circuit voltage can be determined based on the target mapping relationship.
[0136] The following is an explanation of one feasible implementation method for determining the target mapping relationship provided in the embodiments of the present application.
[0137] Figure 6 Please refer to the flowchart of determining the target mapping relationship provided in the embodiment of this application. Figure 6 , determining a first discharge depth of the battery according to the first open circuit voltage and a mapping relationship between the open circuit voltage and the discharge depth, including:
[0138] S610: Obtain the current battery temperature and the current battery charge and discharge times.
[0139] It should be noted that the current battery temperature and the current battery charge and discharge times may be one of the parameters of the battery of the terminal device, and may be acquired by a detection unit pre-set in the battery circuit.
[0140] The current battery temperature may be an average temperature over a period of time, for example, an average temperature over 10 seconds. In actual implementation, the battery temperature may be obtained once a second, and the battery temperatures obtained over 10 seconds may be averaged to obtain the current battery temperature.
[0141] The current battery charge and discharge times may refer to the number of times the battery of the terminal device has been charged and discharged at the current time, and may be an integer.
[0142] After obtaining the above two data, it can be determined whether the current battery temperature and the current battery charge and discharge times are the same as the corresponding battery temperatures and battery charge and discharge times in the multiple sets of mapping relationships stored in the terminal device. If so, the mapping relationship can be used as the target mapping relationship.
[0143] Correspondingly, when the current battery temperature and the current battery charge and discharge times are the battery temperatures and battery charge and discharge times corresponding to the target mapping relationship, it can be determined that the terminal device stores the target mapping relationship corresponding to the current temperature and the current battery charge and discharge times.
[0144] S620: Determine a first discharge depth of the battery according to the first open circuit voltage and the target mapping relationship.
[0145] The target mapping relationship is one of the multiple mapping relationships.
[0146] It should be noted that, when it is determined that the above target mapping relationship exists in the terminal device, the first discharge depth corresponding to the first open circuit voltage can be determined based on the target mapping relationship.
[0147] In the method for displaying the power provided in the embodiment of the present application, the current battery temperature and the current battery charge and discharge times can be obtained. When the current battery temperature and the current battery charge and discharge times are the battery temperature and the battery charge and discharge times corresponding to the target mapping relationship, the first discharge depth of the battery is determined according to the first open circuit voltage and the target mapping relationship. Among them, according to the adaptation between the current temperature and the current battery charge and discharge times and the multiple mapping relationships, the target mapping relationship can be determined from the multiple mapping relationships, and the first discharge depth corresponding to the first open circuit voltage can be determined based on the target mapping relationship. The current temperature and the current battery charge and discharge times are taken into account in the mapping relationship, which can improve the accuracy of determining the discharge depth.
[0148] In actual use, the measured current temperature and the current battery charge and discharge times are usually not in multiple mapping relationships. In order to meet more temperatures and battery charge and discharge times, the target mapping relationship corresponding to the current temperature and the current battery charge and discharge times can be fitted based on the multiple stored mapping relationships. The specific method is as follows:
[0149] In one embodiment, after obtaining the current battery temperature and the current battery charge and discharge times, the method further includes:
[0150] In the case that there is no target mapping relationship, S630: determine multiple groups of first mapping relationships with different temperatures under the current battery charge and discharge times according to two groups of mapping relationships with the same battery temperature and different battery charge and discharge times.
[0151] In one embodiment, there may be 101 corresponding situations in each mapping relationship, which are the values of the open circuit voltage OCV corresponding to each 1% from DOD=0 to DOD=100%, that is, a set of mapping relationships may include 101 sub-corresponding data.
[0152] It should be noted that, assuming that the current battery charge and discharge times cc is 200 times, but the stored mapping relationships only have mapping relationships where the battery charge and discharge times cc are 0 times, 400 times, 800 times, etc., then the first mapping relationship can be determined based on the two mapping relationships closest to the current battery charge and discharge times. The specific method is as follows:
[0153] If one of the mapping relationships is a mapping relationship of temperature = -10°C, cc = 0 times, and the other mapping relationship is a mapping relationship of temperature = -10°C, cc = 400 times, a mapping result based on the current battery charge and discharge times can be determined based on these two mapping relationships.
[0154] For example: cc = 0 temperature = -10° DOD = 0 OCV = 4401.95mv;
[0155] cc = 400 Temperature = -10° DOD = 0 OCV = 4425.06mv;
[0156] Then the calculation formula for OCV at cc = 200, temperature = -10°, DOD = 0 is as follows:
[0157] Uocv=4401.95+(4425.06-4401.95)*(400-200) / (400-0)=4413.505mv.
[0158] The above calculation is the OCV value corresponding to DOD=0 in each mapping relationship. The OCV value corresponding to other DOD values can be calculated in the same way, and each result is calculated in turn. After the same mapping relationship is calculated, the mapping relationship corresponding to the next temperature can be calculated in the same way as the above process, and finally multiple groups of first mapping relationships based on the current battery charge and discharge times at different temperatures are obtained.
[0159] S640: Determine a second mapping relationship of the current temperature from two sets of first mapping relationships with different temperatures.
[0160] It should be noted that, assuming that the current battery temperature is 32°C, but the stored mapping relationships only include mapping relationships for battery temperatures of 10°C, 25°C, 50°C, etc., the second mapping relationship can be determined based on the two mapping relationships closest to the current battery temperature, wherein the mapping relationships used here can be two mapping relationships among the multiple groups of first mapping relationships determined in the aforementioned step S630.
[0161] If one of the first mapping relationships is a mapping relationship of temperature = 25°C, cc = 200 times, and the other first mapping relationship is a mapping relationship of temperature = 50°C, cc = 200 times, a mapping result based on the current temperature and the current number of battery charge and discharge times can be determined based on these two first mapping relationships.
[0162] For example: Temperature = 25°C, cc = 200 times, DOD = 0, OCV = 4443.8mv;
[0163] Temperature = 50°C, cc = 200 times, DOD = 0, OCV = 4425.8mv;
[0164] Then the calculation formula for OCV with DOD = 0 at temperature = 32°C is as follows:
[0165] Uocv=4443.8+(4425.8-4443.8)*(50-32) / (50-25)=4430.84mv.
[0166] The above calculation is for the OCV value corresponding to DOD=0 in each mapping relationship. The OCV values corresponding to other DOD values can be calculated in the same way, and each result is calculated in turn to obtain the second mapping relationship.
[0167] It should be noted that the above process of obtaining the second mapping relationship is to first determine multiple groups of first mapping relationships for the same battery charge and discharge times, and then obtain the second mapping relationship at the current temperature. This method is only one of the feasible methods. In actual application, multiple groups of mapping relationships for the same battery temperature can also be determined first, and then the second mapping relationship under the current battery charge and discharge times can be obtained. No specific limitation is made here.
[0168] S650: Determine a first discharge depth of the battery according to the first open circuit voltage and the second mapping relationship.
[0169] Optionally, after obtaining the second mapping relationship, the first discharge depth of the battery can be determined according to the first open circuit voltage. The specific process is as follows:
[0170] As explained above, the mapping relationship stores the open circuit voltage corresponding to each 1% of DOD from DOD=0 to DOD=100%, that is, the mapping relationship includes 101 corresponding situations.
[0171] First, after obtaining the first open circuit voltage, it is possible to identify in which interval the first open circuit voltage is located, for example, between ocv_a and ocv_b. Then, it is necessary to map ocv_a and ocv_b into the current DOD data to obtain the first discharge depth obtained by the final calculation. The specific mapping method is as follows:
[0172] Assume that the first open circuit voltage estimated by parameter identification = 3885mv, which is between ocv_a = 3890mv and ocv_b = 3879mv in the DOD-OCV table, where:
[0173] When ocv_a = 3890mv, the corresponding DOD = 47%;
[0174] When ocv_b = 3879mv, the corresponding DOD = 48%;
[0175] Then the DOD of the first open circuit voltage = 3885mv is calculated as follows:
[0176] est_dod=47+(48-47)*(3879-3885) / (3879-3890)=47.55%.
[0177] That is to say, when the first open circuit voltage is 3885 mv, the corresponding first discharge depth is 47.55%.
[0178] In the method for displaying the amount of electricity provided in the embodiment of the present application, in the absence of a target mapping relationship, multiple groups of first mapping relationships with different temperatures under the current battery charge and discharge times can be determined based on two groups of mapping relationships with the same battery temperature and different battery charge and discharge times; the second mapping relationship of the current temperature can be determined from the two groups of first mapping relationships with different temperatures; the first discharge depth of the battery can be determined based on the first open circuit voltage and the second mapping relationship. Wherein, in the absence of a target mapping relationship, multiple groups of first mapping relationships and the determined second mapping relationship can be obtained in sequence by calculating and adjusting the existing mapping relationships, and the first discharge depth corresponding to the first open circuit voltage can be obtained more accurately and reasonably based on the second mapping relationship.
[0179] It should be noted that the first discharge depth corresponding to the first open circuit voltage can be calculated by the above method, and then it can be determined whether the cut-off voltage needs to be adjusted based on the comparison result between the discharge depths. Before adjusting the cut-off voltage, the current power of the battery can be further determined. The specific implementation method is as follows:
[0180] Figure 7 Another schematic diagram of the process of adjusting the cut-off voltage provided in the embodiment of the present application is shown in FIG. Figure 7 , S710: Determine whether the battery power is greater than or equal to a first power threshold.
[0181] It should be noted that the battery power here may refer to the battery charge capacity SOC. If the charge capacity is low, there may be errors in the above method. In order to avoid this, a first current threshold may be set. For example, the first power threshold may be SOC=15%.
[0182] The cut-off voltage of the electric quantity meter of the terminal device is adjusted based on the compensation voltage to obtain the adjusted cut-off voltage, including:
[0183] When the power level of the battery is greater than or equal to the first power level threshold, S720: adjusting a cutoff voltage of a power meter of the terminal device based on the compensation voltage to obtain an adjusted cutoff voltage.
[0184] It should be noted that, when the charge capacity SOC of the battery is greater than or equal to the first power threshold (15%), the cutoff voltage of the power meter of the terminal device can be adjusted based on the compensation voltage to obtain an adjusted cutoff voltage.
[0185] In the method for displaying the power provided in the embodiment of the present application, when the power of the battery is greater than or equal to the first power threshold, the cut-off voltage of the power meter of the terminal device can be adjusted based on the compensation voltage to obtain the adjusted cut-off voltage. Among them, setting the charge capacity of the compensation cut-off voltage can avoid the problem of calculation error caused by low charge amount during the power adjustment process, and improve the accuracy of the cut-off voltage adjustment.
[0186] It should be noted that the first open circuit voltage may be obtained by calculation based on data collected from the terminal device, and the specific implementation method is as follows:
[0187] In one embodiment, determining a first open circuit voltage of a battery of a terminal device according to battery parameters of the terminal device includes: obtaining multiple sets of battery parameters of the terminal device, each set of battery parameters including: battery voltage and battery current; inputting the multiple sets of battery parameters into a preset open circuit voltage calculation model to obtain the first open circuit voltage of the battery of the terminal device.
[0188] It should be noted that the battery parameters may include multiple groups, each group of battery parameters may be multiple parameters obtained at the same time point, and multiple groups of battery parameters may be obtained during the operation of the terminal device, and then the multiple groups of battery parameters may be input into a preset open circuit voltage calculation model to obtain the above-mentioned first open circuit voltage.
[0189] The battery parameters may include battery voltage and battery current, wherein the battery voltage may be the detected terminal voltage, for example Figure 2 In Ut, the battery current can be the current in the battery circuit, such as Figure 2 I in.
[0190] The preset open circuit voltage calculation model can be based on the aforementioned U ocv By inputting multiple parameters into the calculation model obtained by the calculation formula of (k), multiple open circuit voltages can be obtained.
[0191] For example, 15 groups of battery parameters can be obtained, and an open circuit voltage can be obtained for each group of battery parameters input. After the 15th group of battery parameters is input, the obtained open circuit voltage can be used as the above-mentioned first open circuit voltage.
[0192] In the method for displaying the power provided in the embodiment of the present application, multiple sets of battery parameters of the terminal device can be obtained; the multiple sets of battery parameters are input into a preset open circuit voltage calculation model to obtain the first open circuit voltage of the battery of the terminal device. By obtaining multiple sets of battery parameters of the terminal device and then calculating the first open circuit voltage, the accuracy of the determined first open circuit voltage can be improved, and the first open circuit voltage is determined based on the above open circuit voltage calculation model, and the model is based on the aforementioned recursive least squares method with forgetting factor to realize voltage calculation, which can further improve the accuracy and stability of the open circuit voltage calculation.
[0193] The following is an explanation of one feasible implementation process of obtaining battery parameters provided in an embodiment of the present application.
[0194] Figure 8 Please refer to the flowchart of obtaining battery parameters provided in the embodiment of this application. Figure 8 Before obtaining multiple sets of battery parameters of the terminal device, the method also includes: determining whether the terminal device meets the battery parameter acquisition conditions, the battery parameter acquisition conditions include: the terminal device is not in a dormant state during the discharge process, and the terminal device is not in a charging state, and the battery power is greater than or equal to a second power threshold.
[0195] It should be noted that before obtaining the battery parameters, it is necessary to determine whether the terminal device currently meets the battery parameter acquisition conditions. The above three conditions can be determined separately or in sequence, and no specific restrictions are made here. Figure 8 In the example, the sequential determination is shown, but in actual application, the determination can also be made separately.
[0196] S810: Determine whether the terminal device is in a dormant state during the discharge process.
[0197] It should be noted that the terminal device may sleep during the discharge process. Once it sleeps, the previous and subsequent data will have no time continuity. In this case, there will be errors in collecting battery parameters. Therefore, it is necessary to identify this scenario. First, use the system interface parameters (for example: Linux API) to obtain the current moment curr_moment, and then compare curr_moment-pre_moment>30s (pre_moment is the value of curr_moment in the previous cycle, that is, the previous moment). If it is greater than 30s, it means that the system has been in sleep at this time.
[0198] It should be noted that if it is greater than 30s, it can be determined that the system is in sleep mode, and it is not suitable to obtain battery parameters, and the system will wait for the next parameter acquisition.
[0199] If the terminal device is in a dormant state during the discharge process, it means that the system is in a dormant state and the battery parameters cannot be obtained. Correspondingly, if the terminal device is not in a dormant state during the discharge process, it means that the system is not in a dormant state and the next condition can be determined.
[0200] If not, S820: determine whether the terminal device is in a charging state.
[0201] Optionally, you can monitor whether the terminal device has a charging event. When a charger is plugged in, set the charger status online to true; when not plugged in, set the charger status online to false. You can determine whether the terminal device is in a charging state through the online state. If so, you cannot obtain battery parameters. If not, you can proceed to the next condition.
[0202] If not, S830: determine whether the battery power is greater than or equal to a second power threshold.
[0203] The second power threshold is similar to the first power threshold, and both can be a threshold of the battery's state of charge (SOC). The second power threshold can be, for example, 30%.
[0204] The battery parameters can be collected only when the battery power of the terminal device is greater than or equal to 30%. When the battery power is less than 30%, it can be determined that the battery parameters cannot be collected.
[0205] If yes, S840: obtain multiple sets of battery parameters of the terminal device.
[0206] After the above three conditions are determined, it can be determined that the terminal device can collect multiple sets of battery parameters, and thus can collect multiple sets of battery parameters.
[0207] It should be noted that for terminal devices, the above three conditions can be determined through multiple states. For example, whether the battery is overcharged can be determined by judging the state of the above online parameter, and whether the battery has entered sleep mode can be determined by judging the state of the system_standby parameter.
[0208] It should be noted that the reason why battery parameters are not obtained when the battery power is <30% is that after aging, the open circuit voltage of the carbon negative electrode battery below 30% SOC will drift significantly, resulting in inaccurate calculated data.
[0209] In one embodiment, during the data collection process, a set of battery parameters may be collected every 10 seconds, and a total of 15 sets of data may be collected, that is, data within 150 seconds.
[0210] In the method for displaying power level provided in the embodiment of the present application, whether the terminal device meets the conditions for obtaining battery parameters can be determined based on whether the terminal device is in a sleep state during the discharge process, whether the terminal device is in a charging state, and whether the battery power is greater than or equal to a second power threshold. In this way, battery parameters can be collected when the conditions for obtaining battery parameters are met, thereby reducing the number of useless battery parameter collection times.
[0211] The following is an explanation of one feasible implementation method for obtaining battery parameters provided in the embodiments of the present application.
[0212] Fig. 9 Another flowchart of obtaining battery parameters provided in the embodiment of the present application is shown in FIG. Fig. 9 , obtain multiple sets of battery parameters of the terminal device, including:
[0213] S910: Obtain N groups of battery parameters.
[0214] Wherein, N is a positive integer greater than 0.
[0215] It should be noted that the value of N can be set according to actual needs. If it is set too small, it may not meet the stability of the data. If there is a lot of data, it may lead to a longer acquisition cycle. The value of N can be set according to actual usage experience, for example: 15.
[0216] Inputting multiple sets of battery parameters into a preset open circuit voltage calculation model to obtain a first open circuit voltage of a battery of a terminal device includes:
[0217] S920: Determine whether all N groups of battery parameters are valid parameters.
[0218] It should be noted that during the data collection process, each collection of a set of battery parameters can determine the total number of battery parameters currently collected. If it is less than N, parameter collection can continue. If N is met, the validity of the N sets of data that have been collected can be determined.
[0219] In the process of determining whether N groups of data are valid parameters, it is possible to determine whether these data are reasonable data. For example, it is possible to determine whether the group of data is valid data based on the magnitude relationship of the battery voltage or battery current in each group of battery parameters.
[0220] It should be noted that the N groups of data can be regarded as a whole. If there are invalid data that do not meet the conditions, the N groups of data will be regarded as invalid data. If the N groups of data are all valid data, the first open circuit voltage can be calculated.
[0221] S930: When all N groups of battery parameters are valid parameters, input the N groups of battery parameters into a preset open circuit voltage calculation model to obtain a first open circuit voltage of the battery of the terminal device.
[0222] It should be noted that, through the above-mentioned validity judgment, if the N groups of battery parameters collected are all valid parameters, then these N groups of battery parameters can be used to calculate the open circuit voltage, and these N groups of data can be input into the open circuit voltage calculation model in sequence, wherein the open circuit voltage calculation model can obtain an output for each data input, and the output result obtained after the Nth group of battery parameters is input is the above-mentioned first open circuit voltage.
[0223] In the method for displaying the power provided in the embodiment of the present application, N groups of battery parameters can be obtained to determine whether the N groups of battery parameters are all valid parameters. If the N groups of battery parameters are all valid parameters, the N groups of battery parameters are input into a preset open circuit voltage calculation model to obtain the first open circuit voltage of the battery of the terminal device. By determining the validity of the N groups of battery parameters, it can be ensured that the battery parameters input into the model are reasonable and accurate parameters, thereby improving the accuracy of the obtained first open circuit voltage.
[0224] The following is an explanation of one feasible implementation process for determining whether battery parameters are valid provided in an embodiment of the present application.
[0225] Fig.10 This is a flow chart of determining whether the battery parameters are valid provided in the embodiment of the present application. Please refer to Fig.10 , determine whether N groups of battery parameters are all valid parameters, including:
[0226] S1010: Determine whether a current step occurs in N groups of battery parameters.
[0227] Optionally, a current step refers to a process in which the current changes significantly. Since multiple groups of battery parameters are collected in chronological order, if there is a current step during the collection period, the battery currents in two adjacent battery parameters will change significantly. Based on this change, it can be determined whether a current step occurs in N groups of battery parameters.
[0228] In one embodiment, determining whether a current step occurs in N groups of battery parameters includes: determining that a current step occurs in the N groups of battery parameters when the battery currents of any two adjacent battery parameters from the battery current of the Mth battery parameter to the battery current of the Nth battery parameter are greater than a preset current threshold, wherein M is a positive integer greater than 0, and M is less than N.
[0229] It should be noted that, in the process of determining the current step, it can be determined whether there are N groups of battery parameters, taking N = 15 as an example. When there are 15 groups of battery parameters, the 15 groups of battery parameters are divided into two parts. The first 6 groups are parameters used to determine time stability, because it takes a certain amount of time from the beginning of parameter identification to approach the actual value; and the last 9 groups are parameters used to determine model stability. If the calculation result fluctuates greatly, it is considered that there is continuous non-convergence.
[0230] Among them, M can take the value of 7, and whether a current step occurs can be determined based on the 7th to 15th data, and the stability of the model can be further determined.
[0231] It should be noted that the preset current threshold value can be, for example, 50mA. When N=15 and M=7, it is determined whether the absolute value of the difference between the battery current src_curr of each adjacent two data from the 7th to the 15th valid data is greater than 50mA. If yes, it means that a step current is generated. If not, it means that no current step is created in the model cycle. Since the calculation result will fluctuate greatly without a current step, it is difficult to continue to converge. Therefore, the data in this case can be determined to be invalid data.
[0232] In the method for displaying the power provided in the embodiment of the present application, when the battery currents of any two adjacent battery parameters from the battery current of the Mth battery parameter to the battery current of the Nth battery parameter are greater than the preset current threshold, it is determined that a current step occurs in the N groups of battery parameters. By determining the difference between the adjacent battery currents, it is possible to more accurately determine whether a current step occurs in the interval between the Mth and Nth battery parameters, thereby more accurately determining the validity of the battery parameters.
[0233] It should be noted that, in addition to determining the battery parameters of the above groups 7 to 15, corresponding determinations can also be made for other battery parameters. The specific implementation method is as follows:
[0234] In one embodiment, before determining whether a current step occurs in N groups of battery parameters, the method further includes: determining whether the battery currents of any two adjacent battery parameters in the battery currents of the first P groups of battery parameters are both less than a preset current threshold, wherein P is a positive integer greater than 0, and P is less than M.
[0235] It should be noted that P can take a value of 3, which can determine whether the absolute value of the difference between any two adjacent battery currents src_curr of the first three groups of battery parameters is within the preset current threshold, such as the above 50mA. If they are all within 50mA, it indicates that the initial discharge current is stable at this time and there is not much fluctuation; otherwise, it can be determined that the first three groups of battery parameters are unstable, the fluctuation is large and does not meet the calculation requirements, and they are not calculated.
[0236] In one embodiment, if the battery currents of any two adjacent battery parameters are both smaller than the preset current threshold, it is determined whether the battery currents of any two adjacent battery parameters from the battery currents of the P+1th group of battery parameters to the battery currents of the Mth group of battery parameters are both larger than the preset current threshold.
[0237] It should be noted that it is possible to determine whether the absolute value of the difference between any two adjacent battery currents src_curr in the 4th to 6th groups of battery parameters is greater than a preset current threshold, such as the aforementioned 50mA. If not, it indicates that no step current is created in the time period. The absence of current fluctuations will make it difficult to converge when the open-circuit voltage calculation model is used subsequently. The result of the open-circuit voltage calculated after the time period has passed is difficult to approach the actual value, so it is not calculated.
[0238] Accordingly, determining whether a current step occurs in the N groups of battery parameters includes: if so, determining whether a current step occurs in the N groups of battery parameters.
[0239] It should be noted that after the above determination is performed on the battery parameters of groups 1-3 and 4-6, the above determination of the current step of groups 7-15 of data can be performed to determine the validity of the battery parameters.
[0240] In the method for displaying the power provided in the embodiment of the present application, it can be determined whether the battery currents of any two adjacent battery parameters in the battery currents of the first P groups of battery parameters are both less than the preset current threshold; if the battery currents of any two adjacent battery parameters are both less than the preset current threshold, it is determined whether the battery currents of any two adjacent battery parameters from the battery current of the P+1 group of battery parameters to the battery current of the M group of battery parameters are both greater than the preset current threshold; if so, it is determined whether a current step is generated in the N groups of battery parameters. By determining multiple battery parameters at different positions in the N groups of battery parameters, it is possible to obtain a more accurate and reasonable determination of whether the N groups of battery parameters are reasonable, thereby avoiding inputting inappropriate battery parameters into the open circuit voltage calculation model.
[0241] In one embodiment, before acquiring multiple groups of battery parameters of the terminal device, the method further includes: triggering a preset operation, where the preset operation is used to cause the battery of the terminal device to generate a current step.
[0242] It should be noted that the current step is usually generated by user operation. For example, when the user opens an application or performs a task, a corresponding current will be generated, which is reflected in the battery as a current step.
[0243] In the actual implementation process, if the user does not actively trigger the terminal device, the current step may not be generated, which will cause the multiple sets of battery parameters obtained to fail to meet the above conditions, thereby failing to calculate the open circuit voltage. In order to avoid this situation, a preset operation can be set before the terminal device obtains multiple sets of battery parameters. For example, it can be an operation to start an application, or an operation to execute a task, and no specific restrictions are made here.
[0244] When it is determined that the terminal device is about to collect battery parameters, a preset operation can be triggered. After the preset operation is triggered, the battery of the terminal device can produce a current step, so that the above-mentioned multiple sets of battery parameters obtained by the terminal device can meet the corresponding current step conditions.
[0245] In the method for displaying the power provided in the embodiment of the present application, a preset operation can be triggered before obtaining multiple sets of battery parameters of the terminal device, wherein the preset operation is used to cause the battery of the terminal device to generate a current step. The preset operation can allow the terminal device to self-trigger, thereby generating a corresponding current step, so that the terminal device can quickly obtain appropriate battery parameters without user triggering, thereby improving the accuracy of obtaining the open circuit voltage.
[0246] S1020: Determine whether the battery voltage and the battery current in the N groups of battery parameters are synchronized data.
[0247] It should be noted that after determining the current step in the above manner, other validity determinations of battery parameters may also be performed, for example, it may be determined whether the battery voltage and the battery current in the battery parameters are synchronized data.
[0248] It should be noted that since the battery voltage and battery current are data obtained through two different threads created in the terminal device, it cannot be guaranteed that the obtained battery voltage and battery current are one-to-one corresponding. In order to ensure the synchronization of the two, synchronization data determination can be performed.
[0249] There are many different ways to determine the synchronization data, which are explained below:
[0250] Fig.11 This is a flow chart of determining whether the battery voltage and battery current are synchronized data provided in the embodiment of the present application. Please refer to Fig.11 , determining whether the battery voltage and the battery current in N groups of battery parameters are synchronized data, including: when the N groups of battery parameters meet all synchronization conditions, determining that the battery voltage and the battery current in the N groups of battery parameters are synchronized data, the synchronization conditions include at least one of the following: the N groups of battery currents are all discharge currents, the changes in the battery voltage and the battery current in two adjacent groups of battery parameters meet preset conditions, and the current battery power is different from the battery power recorded last time.
[0251] It should be noted that the above-mentioned multiple conditions can be judged separately or in sequence. Fig.11 The explanation is given by taking the determinations performed sequentially as an example. In the actual implementation process, the determinations may also be performed separately, and no specific limitation is made here.
[0252] S1110: Determine whether the currents of the N groups of batteries are all discharge currents.
[0253] It should be noted that the determination can be made based on the direction of the battery current. Discharging is a negative current and charging is a positive current. If the obtained currents of the N groups of batteries are all negative currents, it can be determined that these currents are all discharge currents.
[0254] Correspondingly, if there is a positive current, it may be a sampling error. In this case, the N groups of data are not calculated, and it is determined that the battery current and the battery voltage are not synchronized.
[0255] If the currents of the N groups of batteries are all discharge currents, step S1120 may be executed: determining whether the changes in the battery voltages and the battery currents in the battery parameters of two adjacent groups meet a preset condition.
[0256] It should be noted that there may be multiple preset conditions, as follows:
[0257] Condition (1): Determine whether the discharge current src_data_2 of the n+1th time is greater than the discharge current src_data_1 of the nth time, and whether src_data_2-src_data_1 is greater than 50 mA, and whether the battery voltage of the n+1th time is greater than the battery voltage of the nth time.
[0258] If the above three sub-conditions are all met, it means that the discharge current src_data_2 of the n+1th time is greater than the discharge current src_data_1 of the nth time, and src_data_2-src_data_1 is greater than 50mA. If the above three sub-conditions are all met, it can be determined that condition (1) is met.
[0259] Condition (2): Determine whether the discharge current src_data_2 of the n+1th time is smaller than the discharge current src_data_1 of the nth time, and whether src_data_1-src_data_2 is greater than 50 mA, and whether the battery voltage of the n+1th time is smaller than the battery voltage of the nth time.
[0260] If the above three sub-conditions are all met, it means that the discharge current src_data_2 of the n+1th time is less than the discharge current src_data_1 of the nth time, and src_data_1-src_data_2 is greater than 50mA. If the above three sub-conditions are all met, it can be determined that condition (2) is met.
[0261] Condition (3): Determine whether the absolute value of the difference between the n+1th discharge current src_data_2 and the nth discharge current src_data_1 is within 10 mA, and whether the absolute value of the difference between the n+1th battery voltage and the nth battery voltage is greater than 5 mV.
[0262] If both of the above sub-conditions are met, it means that the absolute value of the difference between the discharge current src_data_2 of the n+1th time and the discharge current src_data_1 of the nth time is within 10ma. When the currents are basically equal, the voltage difference should be within 5mv. When both of the above sub-conditions are met, it can be determined that condition (3) is met.
[0263] If the changes in the battery voltage and the battery current in two adjacent groups of battery parameters meet the preset conditions, step S1130 may be executed: determining whether the current battery power is different from the previously recorded battery power.
[0264] Among them, the battery power refers to the charge capacity of the battery, which is the aforementioned SOC. It can be determined whether the SOC recorded last time is equal to the current SOC. If so, it can be determined that the power has not changed significantly and no adjustment is required. It is equivalent to that the same battery SOC has been calculated once, and it will not be calculated this time even if the data meets the requirements.
[0265] When the current battery power is different from the last recorded battery power, it can be determined that the battery current and the battery voltage are synchronized, and subsequent calculation can be performed, that is, step S1140 is executed: determining that the battery voltage and the battery current in the N groups of battery parameters are synchronized data.
[0266] In the method for displaying the power provided in the embodiment of the present application, the battery voltage and battery current in the N groups of battery parameters can be determined as synchronized data when the N groups of battery parameters meet all synchronization conditions, and the synchronization conditions include at least one of the following: the N groups of battery currents are all discharge currents, the changes in the battery voltage and the battery current in the two adjacent groups of battery parameters meet the preset conditions, and the current battery power is different from the battery power recorded last time. Among them, by determining the above-mentioned multiple synchronization conditions, it can be more accurately determined that the battery current and battery voltage in the same group of battery parameters are synchronized, thereby improving the accuracy of the battery parameters and further improving the accuracy of the open circuit voltage calculation of the battery.
[0267] It should be noted that the above determination of synchronization data is only one feasible manner, and in actual implementation, other determination processes for determining synchronization data may also be adopted.
[0268] In one embodiment, determining whether the battery voltage and the battery current in N groups of battery parameters are synchronized data includes: when the N groups of battery parameters are sampled by a fuel gauge using a target sampling rate and stored in a cache of a terminal device, determining that the battery voltage and the battery current in the N groups of battery parameters are synchronized data.
[0269] It should be noted that the fuel gauge can use a target sampling rate to sample the battery data. For example, a high sampling rate ADC can be used to collect battery voltage and battery current, and the collected battery voltage and battery power can be stored in a corresponding cache. When the terminal device accesses the cache, the battery voltage and battery current can be read from the cache. Since a high sampling rate is used for sampling, the synchronization of the collected battery voltage and battery current can be guaranteed, and there is no need to verify the synchronization of the battery voltage and battery current. The read battery voltage and battery current can be used as synchronization data.
[0270] In the method for displaying the power provided in the embodiment of the present application, the battery voltage and the battery current in the N groups of battery parameters can be determined to be synchronized data when the N groups of battery parameters are sampled by the fuel gauge at the target sampling rate and stored in the cache of the terminal device. Among them, the fuel gauge performs sampling according to the target sampling rate, so that the collected battery voltage and battery current can be guaranteed to be synchronized data, and the synchronized data can be stored in the cache of the terminal device, so that the terminal device can read directly from the cache, so as to ensure that the battery current and the battery voltage are synchronized, avoid the need for additional synchronization determination of the battery current and the battery voltage, and save power consumption.
[0271] It should be noted that the above scheme is used to determine whether a current step occurs in the battery parameters and whether the battery voltage and the battery current in the battery parameters are synchronized, and then the validity of the battery parameters can be determined.
[0272] S1030: generating a current step in N groups of battery parameters, and in the case where the battery voltage and the battery current in the N groups of battery parameters are synchronized data, determining that all the N groups of battery parameters are valid parameters.
[0273] It should be noted that when a current step is generated in N sets of battery parameters and the battery voltage and battery current in the N sets of battery parameters are synchronized data, it is determined that the N sets of battery parameters are all valid parameters. Correspondingly, if any of the above two conditions is not met, it can be determined that the N sets of battery parameters are not valid parameters.
[0274] In the method for displaying the power provided in the embodiment of the present application, it is possible to determine whether a current step is generated in N groups of battery parameters; determine whether the battery voltage and the battery current in the N groups of battery parameters are synchronized data; when a current step is generated in the N groups of battery parameters, and the battery voltage and the battery current in the N groups of battery parameters are synchronized data, determine that the N groups of battery parameters are all valid parameters. Among them, by successively determining whether a current step is generated and whether the battery current and the battery voltage are synchronized data, the battery parameters that do not meet the conditions can be screened out, thereby obtaining more accurate and effective battery parameters that meet the needs.
[0275] The following is an explanation of the implementation process of parameter identification of the open circuit voltage obtained from the battery parameters provided in the embodiments of the present application.
[0276] Fig.12 Another flow chart of determining the compensation voltage provided in the embodiment of the present application is shown in FIG. Fig.12 Before determining the compensation voltage according to the voltage difference between the first open circuit voltage and the second open circuit voltage, the method further includes:
[0277] S1210: Determine whether the first open circuit voltage satisfies a voltage constraint.
[0278] It should be noted that the first open circuit voltage is the open circuit voltage output after the Nth group of battery parameters are input into the open circuit voltage calculation model. The value of the open circuit voltage can be used to determine whether the corresponding voltage constraint is met, wherein the voltage constraint refers to the constraint condition that the open circuit voltage should meet, for example: it should be within a preset range. If it exceeds the range, the voltage constraint is not met.
[0279] In one embodiment, determining whether the first open circuit voltage satisfies the voltage constraint includes: determining whether the first open circuit voltage is within a target voltage interval, where the target voltage interval is determined based on the terminal voltage of the battery, the resistance in the circuit, and the battery current.
[0280] It should be noted that the value of the first open circuit voltage can be recorded as ffrls_ocv, and the resistance r0 in the circuit can be recorded as ffrls_r0, where r0 can be Figure 2 Ro in.
[0281] It should be noted that the open circuit voltage is usually larger than the battery terminal voltage. Considering the first-order equivalent model of the battery, its open circuit voltage will be larger than the battery terminal voltage + battery current multiplied by the calculated estimated R0 impedance, but it cannot be too large and can be set within 10mv.
[0282] In the process of determining the voltage constraint, it can be determined whether the following formula is true:
[0283] ffrls_ocv>src_volt+ffrls_r0*src_current;
[0284] ffrls_ocv <src_volt+ffrls_r0*src_current+10mv;
[0285] ffrls_r0>0;
[0286] Among them, src_volt is the terminal voltage of the battery, that is, the battery voltage in the above battery parameters; src_current is the battery current, that is, the battery current in the above battery parameters.
[0287] When the above three formulas are all satisfied, it can be determined that the first open circuit voltage is within the target voltage range.
[0288] It should be noted that if it is not satisfied, it means that the calculated first open circuit voltage does not meet the constraint of the battery terminal voltage, and the result is wrong and will not be used. If it is satisfied, it means that the calculated first open circuit voltage meets the constraint of the battery terminal voltage.
[0289] When the above three conditions are met, it can be determined that the first open circuit voltage meets the voltage constraint.
[0290] In the method for displaying the power provided in the embodiment of the present application, it is possible to determine whether the first open circuit voltage is within the target voltage range, and the target voltage range is determined based on the terminal voltage of the battery, the resistance in the circuit, and the battery current. By determining whether the first open circuit voltage is within the target voltage range, it is possible to more accurately determine whether the obtained first open circuit voltage is reasonable, thereby avoiding errors in the calculation of the compensation voltage caused by calculating an erroneous first open circuit voltage.
[0291] Accordingly, determining the compensation voltage according to the voltage difference between the first open circuit voltage and the second open circuit voltage includes:
[0292] S1220: When the first open circuit voltage satisfies the voltage constraint, determine a compensation voltage according to a voltage difference between the first open circuit voltage and the second open circuit voltage.
[0293] It should be noted that, when the first open-circuit voltage satisfies the above voltage constraint, the compensation voltage can be determined according to the voltage difference between the first open-circuit voltage and the second open-circuit voltage.
[0294] The specific process of determining the compensation voltage has been explained above and will not be repeated here.
[0295] In the method for displaying the electric quantity provided in the embodiment of the present application, it is possible to determine whether the first open circuit voltage satisfies the voltage constraint; when the first open circuit voltage satisfies the voltage constraint, the compensation voltage is determined according to the voltage difference between the first open circuit voltage and the second open circuit voltage. By determining whether the open circuit voltage satisfies the voltage constraint, the accuracy of the calculation of the open circuit voltage can be ensured, and errors in the calculation of the compensation voltage caused by calculating an erroneous first open circuit voltage can be avoided.
[0296] In one embodiment, during the process of calculating the first open circuit voltage based on the above open circuit voltage calculation model, multiple steps may be performed in sequence to determine the open circuit voltage.
[0297] For example, the state variables of the state-space equation in the model can be determined first, and then the error and Kalman gain can be calculated. Then, the covariance matrix, model parameters, and resistance r0 can be updated by inputting multiple battery parameters, and finally the open circuit voltage can be calculated.
[0298] Among them, after each set of battery parameters is input into the open circuit voltage calculation model, an undetermined open circuit voltage can be obtained, and these open circuit voltages can be put into an open circuit voltage set.
[0299] Optionally, the open circuit voltage set includes at least part of the pending open circuit voltages that are located later in the order of obtaining the multiple pending open circuit voltages, for example, the Mth to Nth pending open circuit voltages, that is, the 7th to 15th open circuit voltages.
[0300] In one embodiment, the largest voltage in the open circuit voltage set may be used as the maximum open circuit voltage, and the smallest voltage in the open circuit voltage set may be used as the minimum open circuit voltage.
[0301] It should be noted that, in addition to the above voltage constraint determination, the data generated in the open circuit voltage calculation model may also be determined, for example, each pending open circuit voltage may be determined to determine whether the output first open circuit voltage is reasonable.
[0302] In one embodiment, before determining whether the first open circuit voltage satisfies the voltage constraint, the method further includes: determining whether a voltage difference between the maximum open circuit voltage and the minimum open circuit voltage is less than a preset voltage difference threshold.
[0303] The maximum open circuit voltage and the minimum open circuit voltage are pending open circuit voltages in the open circuit voltage set.
[0304] Optionally, it may be determined whether the difference between the maximum open circuit voltage max_ocv and the minimum open circuit voltage min_ocv in the open circuit voltage set is within 3 mv.
[0305] If it is not within 3mv, it indicates that the fluctuation is relatively large. It can be determined that ffrls (forgetting factor recursive least squares method) does not have good convergence at this time. Do not trust the calculation results this time, and then end the calculation of the 15 valid data.
[0306] In contrast, if it is within 3 mv, it indicates that the fluctuation is small, and the last undetermined open-circuit voltage can be used as the above-mentioned first open-circuit voltage.
[0307] Correspondingly, determining whether the first open circuit voltage satisfies the voltage constraint includes: when the voltage difference is less than a preset voltage difference threshold, determining whether the first open circuit voltage satisfies the voltage constraint.
[0308] In the method for displaying the amount of electricity provided in the embodiment of the present application, it is possible to determine whether the voltage difference between the maximum open circuit voltage and the minimum open circuit voltage is less than a preset voltage difference threshold; if the voltage difference is less than the preset voltage difference threshold, it is determined whether the first open circuit voltage satisfies the voltage constraint. The output fluctuation of the open circuit voltage calculation model can be determined more accurately by determining the maximum open circuit voltage and the minimum open circuit voltage in the open circuit voltage set, thereby preventing data with large fluctuations from affecting the determination of the first open circuit voltage.
[0309] The following is an overall explanation of the specific process of obtaining battery parameters, identifying battery parameters, determining compensation voltage, and determining cut-off voltage provided in the embodiments of the present application.
[0310] Fig.13 This is a schematic diagram of the overall process of obtaining battery parameters provided in the embodiment of the present application. Please refer to Fig.13 First, it is possible to determine whether the terminal device meets the parameter acquisition conditions. For example, it is possible to determine whether the terminal device is in a dormant state during the discharge process, whether the terminal device is in a charging state, and whether the battery power is greater than or equal to a second power threshold. When all of the above conditions are met, multiple groups of battery parameters can be obtained. After obtaining N groups of battery parameters, it is possible to determine whether these N groups of battery parameters are available. If so, it is possible to further determine whether a current step is generated, whether the battery current and the battery voltage are synchronized data, and then determine that the above battery parameters are valid battery parameters.
[0311] Fig.14 This is a schematic diagram of the overall process of identifying battery parameters provided in the embodiment of the present application. Please refer to Fig.14 After obtaining N groups of battery parameters, the N groups of battery parameters can be input into the open circuit voltage calculation model. Each time an input is made, a pending open circuit voltage can be obtained. An open circuit voltage set can be constructed based on these pending open circuit voltages, and it can be determined whether the voltage difference between the maximum open circuit voltage and the minimum open circuit voltage is less than a preset voltage difference threshold. If so, it can be determined whether the first open circuit voltage is within the target voltage range. If all conditions are met, the compensation voltage can be determined according to the voltage difference between the first open circuit voltage and the second open circuit voltage.
[0312] Fig.15 This is a schematic diagram of the overall process of determining the compensation voltage provided in the embodiment of the present application. Please refer to Fig.15 In the process of determining the compensation voltage, the current battery temperature and the current battery charge and discharge times can be obtained, and a corresponding mapping relationship is determined according to the current battery temperature and the current battery charge and discharge times. The first discharge depth is determined according to the mapping relationship. When the difference between the absolute values of the first discharge depth and the second discharge depth is greater than a preset discharge depth threshold, the compensation voltage can be calculated according to the first open circuit voltage and the second open circuit voltage.
[0313] Fig.16 Please refer to the flowchart of the core determining the cut-off voltage provided in the embodiment of the present application. Fig.16After obtaining the compensation voltage, the compensation voltage can be sent to the kernel of the terminal device. The kernel polls the power meter every 10 seconds to see if it needs to be recalibrated. If so, the compensation voltage can be set to zero and then calibrated according to the sent compensation voltage. If no calibration is required, the current compensation voltage is kept unchanged. When the current compensation voltage is different from the sent compensation voltage, the cutoff voltage can be updated based on the compensation voltage, that is, the compensation voltage is increased based on the original cutoff voltage.
[0314] It should be understood that, although the steps in the above-mentioned flowcharts are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flowcharts may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0315] Based on the foregoing embodiments, an embodiment of the present application provides a power display device, which includes the modules included and the units included in the modules, which can be implemented by a processor; of course, it can also be implemented by a specific logic circuit; in the implementation process, the processor can be a central processing unit (CPU), a microprocessor (MPU), a digital signal processor (DSP) or a field programmable gate array (FPGA), etc.
[0316] Fig.17 This is a schematic diagram of the structure of the power display device provided in the embodiment of the present application. Please refer to Fig.17 , a power display device, comprising: a parameter determination module 1710, a voltage adjustment module 1720 and a power display module 1730;
[0317] A parameter determination module 1710, configured to determine a first open circuit voltage of a battery of a terminal device according to a battery parameter of the terminal device, where the battery parameter is used to characterize battery circuit information of the terminal device;
[0318] The voltage adjustment module 1720 is used to adjust the cut-off voltage of the power meter of the terminal device based on the first open-circuit voltage and the second open-circuit voltage detected by the power meter of the battery to obtain an adjusted cut-off voltage;
[0319] The power display module 1730 is used to display the power of the terminal device according to the adjusted cut-off voltage.
[0320] In one embodiment, the voltage adjustment module 1720 is specifically configured to determine a compensation voltage according to a voltage difference between the second open circuit voltage and the first open circuit voltage; and adjust a cutoff voltage of a power meter of the terminal device based on the compensation voltage to obtain an adjusted cutoff voltage.
[0321] In one embodiment, the voltage adjustment module 1720 is further used to determine a first discharge depth of the battery based on the first open circuit voltage and a mapping relationship between the open circuit voltage and the discharge depth; when the absolute value of the difference between the first discharge depth and the second discharge depth detected by the fuel gauge is greater than a preset discharge depth threshold, determine the compensation voltage based on the voltage difference between the second open circuit voltage and the first open circuit voltage.
[0322] In one embodiment, the voltage adjustment module 1720 is specifically used to determine that the compensation voltage is a preset first compensation voltage when the difference between the second open-circuit voltage and the first open-circuit voltage is greater than or equal to the first voltage threshold; determine that the compensation voltage is a preset second compensation voltage when the difference between the second open-circuit voltage and the first open-circuit voltage is less than or equal to the second voltage threshold, and the second compensation voltage is less than the first compensation voltage; and determine that the compensation voltage is the voltage difference between the second open-circuit voltage and the first open-circuit voltage when the difference between the second open-circuit voltage and the first open-circuit voltage is less than the first voltage threshold and greater than the second voltage threshold.
[0323] In one embodiment, the mapping relationship includes multiple groups, each group of mapping relationships is a mapping relationship under different battery temperatures and / or different battery charge and discharge times; the voltage adjustment module 1720 is specifically used to obtain the current battery temperature and the current battery charge and discharge times; when the current battery temperature and the current battery charge and discharge times are the corresponding battery temperatures and battery charge and discharge times in the target mapping relationship, the first discharge depth of the battery is determined according to the first open circuit voltage and the target mapping relationship, and the target mapping relationship is one of the multiple groups of mapping relationships.
[0324] In one embodiment, the voltage adjustment module 1720 is specifically used to determine, in the absence of a target mapping relationship, multiple groups of first mapping relationships at different temperatures under the current battery charge and discharge times based on two groups of mapping relationships with the same battery temperature and different battery charge and discharge times; determine the second mapping relationship of the current temperature from the two groups of first mapping relationships with different temperatures; and determine the first discharge depth of the battery based on the first open circuit voltage and the second mapping relationship.
[0325] In one embodiment, the voltage adjustment module 1720 is specifically configured to adjust the cutoff voltage of the power meter of the terminal device based on the compensation voltage to obtain the adjusted cutoff voltage when the power level of the battery is greater than or equal to the first power threshold.
[0326] In one embodiment, the parameter determination module 1710 is specifically used to obtain multiple sets of battery parameters of the terminal device, each set of battery parameters includes: battery voltage and battery current; input the multiple sets of battery parameters into a preset open circuit voltage calculation model to obtain the first open circuit voltage of the terminal device battery.
[0327] In one embodiment, the parameter determination module 1710 is also used to determine whether the terminal device meets the battery parameter acquisition conditions, and the battery parameter acquisition conditions include: the terminal device is not in a sleep state during the discharge process, and the terminal device is not in a charging state, and the battery power is greater than or equal to a second power threshold.
[0328] In one embodiment, the parameter determination module 1710 is specifically used to obtain N groups of battery parameters, where N is a positive integer greater than 0; determine whether the N groups of battery parameters are all valid parameters; if the N groups of battery parameters are all valid parameters, input the N groups of battery parameters into a preset open circuit voltage calculation model to obtain the first open circuit voltage of the terminal device battery.
[0329] In one embodiment, the parameter determination module 1710 is specifically used to determine whether a current step is generated in N groups of battery parameters; determine whether the battery voltage and the battery current in the N groups of battery parameters are synchronized data; when a current step is generated in the N groups of battery parameters and the battery voltage and the battery current in the N groups of battery parameters are synchronized data, determine that the N groups of battery parameters are all valid parameters.
[0330] In one embodiment, the parameter determination module 1710 is specifically used to determine that a current step occurs in N groups of battery parameters when the battery currents of any two adjacent battery parameters from the battery current of the Mth battery parameter to the battery current of the Nth battery parameter are greater than a preset current threshold, wherein M is a positive integer greater than 0, and M is less than N.
[0331] In one embodiment, the parameter determination module 1710 is specifically used to determine that the battery voltage and battery current in N groups of battery parameters are synchronized data when N groups of battery parameters meet all synchronization conditions, and the synchronization conditions include at least one of the following: the battery currents in the N groups are all discharge currents, the changes in the battery voltage and the battery current in two adjacent groups of battery parameters meet preset conditions, and the current battery power is different from the battery power recorded last time.
[0332] In one embodiment, the parameter determination module 1710 is specifically used to determine that the battery voltage and the battery current in the N groups of battery parameters are synchronous data when the N groups of battery parameters are sampled by the fuel gauge using the target sampling rate and stored in the cache of the terminal device.
[0333] In one embodiment, the parameter determination module 1710 is specifically used to determine whether the battery currents of any two adjacent battery parameters in the battery currents of the first P groups of battery parameters are both less than a preset current threshold, wherein P is a positive integer greater than 0, and P is less than M; if so, determine whether the battery currents of any two adjacent battery parameters from the battery current of the Pth group of battery parameters to the battery current of the Mth group of battery parameters are both greater than the preset current threshold; if so, determine whether a current step occurs in the N groups of battery parameters.
[0334] In one embodiment, the parameter determination module 1710 is further used to determine whether the first open circuit voltage meets the voltage constraint: when the first open circuit voltage meets the voltage constraint, the compensation voltage is determined according to the voltage difference between the first open circuit voltage and the second open circuit voltage.
[0335] In one embodiment, the parameter determination module 1710 is specifically used to determine whether the first open circuit voltage is within a target voltage range, where the target voltage range is determined based on the terminal voltage of the battery, the resistance in the circuit, and the battery current.
[0336] In one embodiment, the parameter determination module 1710 is further used to determine whether the voltage difference between the maximum open circuit voltage and the minimum open circuit voltage is less than a preset voltage difference threshold, wherein, after each set of battery parameters is input into the open circuit voltage calculation model, a pending open circuit voltage is obtained, and the open circuit voltage set includes at least part of the pending open circuit voltages located at the back in the order of obtaining the multiple pending open circuit voltages, and the maximum open circuit voltage and the minimum open circuit voltage are the pending open circuit voltages in the open circuit voltage set; when the voltage difference is less than the preset voltage difference threshold, it is determined whether the first open circuit voltage meets the voltage constraint.
[0337] In one embodiment, the parameter determination module 1710 is further used to trigger a preset operation, where the preset operation is used to cause a battery of the terminal device to generate a current step.
[0338] The description of the above device embodiment is similar to the description of the above method embodiment, and has similar beneficial effects as the method embodiment. For technical details not disclosed in the device embodiment of the present application, please refer to the description of the method embodiment of the present application for understanding.
[0339] It should be noted that in the embodiments of this application Fig.17The division of modules in the power display device shown is schematic and is only a logical function division. There may be other division methods in actual implementation. In addition, each functional unit in each embodiment of the present application may be integrated into a processing unit, or may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of a software functional unit. It may also be implemented in the form of a combination of software and hardware.
[0340] It should be noted that in the embodiment of the present application, if the above method is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on such an understanding, the technical solution of the embodiment of the present application can be essentially or partly embodied in the form of a software product that contributes to the relevant technology. The computer software product is stored in a storage medium, including several instructions to enable an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a U disk, a mobile hard disk, a read-only memory (ROM), a magnetic disk or an optical disk. In this way, the embodiment of the present application is not limited to any specific combination of hardware and software.
[0341] Fig.18 For a schematic diagram of the structure of the computer device provided in the embodiment of the present application, please refer to Fig.18 , an embodiment of the present application provides a computer device, which may be the above-mentioned terminal device, and its internal structure diagram may be as shown in Fig.18 As shown. The computer device includes a processor 1820, a memory and a network interface 1840 connected via a system bus 1810. Among them, the processor 1820 of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium 1831 and an internal memory 1832. The non-volatile storage medium 1831 stores an operating system, a computer program and a database. The internal memory 1832 provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium 1831. The database of the computer device is used to store data. The network interface 1840 of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor 1820, the above method is implemented.
[0342] An embodiment of the present application provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the method provided in the above embodiment are implemented.
[0343] An embodiment of the present application provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the steps of the method provided in the above method embodiment.
[0344] Those skilled in the art will understand that Fig.18 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0345] In one embodiment, the power display device provided in the present application can be implemented in the form of a computer program. The computer program can be Fig.18 The computer device shown in the figure is run. The memory of the computer device can store various program modules constituting the above-mentioned device. The computer program composed of various program modules enables the processor to execute the steps in the method of each embodiment of the present application described in this specification.
[0346] It should be noted here that the description of the above storage medium and device embodiments is similar to the description of the above method embodiments, and has similar beneficial effects as the method embodiments. For technical details not disclosed in the storage medium, storage medium and device embodiments of this application, please refer to the description of the method embodiments of this application for understanding.
[0347] It should be understood that "one embodiment" or "an embodiment" or "some embodiments" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present application. Therefore, "in one embodiment" or "in one embodiment" or "in some embodiments" appearing throughout the specification may not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present application, the size of the sequence number of the above-mentioned processes does not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application. The above-mentioned sequence numbers of the embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments. The above description of each embodiment tends to emphasize the differences between the various embodiments, and the same or similar aspects can be referenced to each other. For the sake of brevity, this article will not repeat them.
[0348] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, object A and / or object B can represent three situations: object A exists alone, object A and object B exist at the same time, and object B exists alone.
[0349] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0350] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple modules or components can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or modules can be electrical, mechanical or other forms.
[0351] The modules described above as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules; they may be located in one place or distributed on multiple network units; some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0352] In addition, all functional modules in the embodiments of the present application may be integrated into one processing unit, or each module may be a separate unit, or two or more modules may be integrated into one unit; the above-mentioned integrated modules may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0353] A person skilled in the art can understand that all or part of the steps of implementing the above method embodiment can be completed by hardware related to program instructions, and the aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it executes the steps of the above method embodiment; and the aforementioned storage medium includes: mobile storage devices, read-only memories (ROM), magnetic disks or optical disks, etc., various media that can store program codes.
[0354] Alternatively, if the above-mentioned integrated unit of the present application is implemented in the form of a software function module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application can essentially or in other words, the part that contributes to the relevant technology can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for enabling an electronic device to execute all or part of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as mobile storage devices, ROMs, magnetic disks, or optical disks.
[0355] The methods disclosed in several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.
[0356] The features disclosed in several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.
[0357] The features disclosed in several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments or device embodiments.
[0358] The above is only an implementation method of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A method for displaying electric quantity, characterized in that: include: Determine a first open circuit voltage of a battery of the terminal device according to a battery parameter of the terminal device, wherein the battery parameter is used to characterize battery circuit information of the terminal device; adjusting a cutoff voltage of the fuel gauge of the terminal device based on the first open circuit voltage and a second open circuit voltage detected by the fuel gauge of the battery to obtain an adjusted cutoff voltage; The power level of the terminal device is displayed according to the adjusted cut-off voltage.
2. The method according to claim 1, characterized in that: The step of adjusting the cutoff voltage of the fuel gauge of the terminal device based on the first open circuit voltage and the second open circuit voltage detected by the fuel gauge of the battery to obtain the adjusted cutoff voltage includes: determining a compensation voltage according to a voltage difference between the second open circuit voltage and the first open circuit voltage; The cut-off voltage of the electricity meter of the terminal device is adjusted based on the compensation voltage to obtain an adjusted cut-off voltage.
3. The method according to claim 2, characterized in that Before determining the compensation voltage according to the voltage difference between the second open-circuit voltage and the first open-circuit voltage, the method further includes: Determining a first discharge depth of the battery according to the first open circuit voltage and a mapping relationship between the open circuit voltage and the discharge depth; The determining of the compensation voltage according to the voltage difference between the second open circuit voltage and the first open circuit voltage comprises: When an absolute value of a difference between the first discharge depth and a second discharge depth detected by the fuel gauge is greater than a preset discharge depth threshold, a compensation voltage is determined according to a voltage difference between the second open circuit voltage and the first open circuit voltage.
4. The method according to claim 2 or 3, characterized in that: The determining of the compensation voltage according to the voltage difference between the second open circuit voltage and the first open circuit voltage comprises: When the difference between the second open circuit voltage and the first open circuit voltage is greater than or equal to a first voltage threshold, determining that the compensation voltage is a preset first compensation voltage; When the difference between the second open-circuit voltage and the first open-circuit voltage is less than or equal to a second voltage threshold, determining that the compensation voltage is a preset second compensation voltage, and the second compensation voltage is less than the first compensation voltage; When the difference between the second open circuit voltage and the first open circuit voltage is smaller than the first voltage threshold and larger than the second voltage threshold, the compensation voltage is determined to be the voltage difference between the second open circuit voltage and the first open circuit voltage.
5. The method according to claim 3, characterized in that: The mapping relationship includes multiple groups, each group of mapping relationships is a mapping relationship under different battery temperatures and / or different battery charge and discharge times; The determining the first discharge depth of the battery according to the first open circuit voltage and a mapping relationship between the open circuit voltage and the discharge depth includes: Get the current battery temperature and the current battery charge and discharge times; When the current battery temperature and the current battery charge and discharge times are the corresponding battery temperatures and battery charge and discharge times in a target mapping relationship, the first depth of discharge of the battery is determined according to the first open circuit voltage and the target mapping relationship, and the target mapping relationship is one of the multiple groups of mapping relationships.
6. The method according to claim 5, characterized in that After obtaining the current battery temperature and the current battery charge and discharge times, the method further includes: In the absence of a target mapping relationship, determining multiple groups of first mapping relationships at different temperatures under the current battery charge and discharge times according to two groups of mapping relationships with the same battery temperature and different battery charge and discharge times; Determine a second mapping relationship of the current temperature from two sets of first mapping relationships with different temperatures; A first discharge depth of the battery is determined according to the first open circuit voltage and the second mapping relationship.
7. The method according to claim 2, characterized in that: The step of adjusting the cut-off voltage of the electricity meter of the terminal device based on the compensation voltage to obtain the adjusted cut-off voltage includes: When the power level of the battery is greater than or equal to a first power threshold, a cutoff voltage of a power meter of the terminal device is adjusted based on the compensation voltage to obtain an adjusted cutoff voltage.
8. The method according to claim 1, characterized in that: The determining a first open circuit voltage of a battery of the terminal device according to a battery parameter of the terminal device includes: Acquire multiple groups of battery parameters of the terminal device, each group of battery parameters including: battery voltage and battery current; The plurality of groups of battery parameters are input into a preset open circuit voltage calculation model to obtain a first open circuit voltage of the battery of the terminal device.
9. The method according to claim 8, characterized in that Before obtaining the multiple groups of battery parameters of the terminal device, the method further includes: Determine whether the terminal device meets the battery parameter acquisition conditions, the battery parameter acquisition conditions including: the terminal device is not in a sleep state during the discharge process, and the terminal device is not in a charging state, and the battery power is greater than or equal to a second power threshold.
10. The method according to claim 8, characterized in that The obtaining of multiple groups of battery parameters of the terminal device includes: Get N groups of battery parameters, where N is a positive integer greater than 0; The step of inputting the plurality of groups of battery parameters into a preset open circuit voltage calculation model to obtain a first open circuit voltage of the battery of the terminal device includes: Determining whether the N groups of battery parameters are all valid parameters; In a case where the N groups of battery parameters are all valid parameters, the N groups of battery parameters are input into a preset open circuit voltage calculation model to obtain a first open circuit voltage of the battery of the terminal device.
11. The method according to claim 10, characterized in that The determining whether the N groups of battery parameters are all valid parameters includes: Determining whether a current step occurs in the N groups of battery parameters; Determine whether the battery voltage and the battery current in the N groups of battery parameters are synchronized data; When a current step is generated in the N groups of battery parameters and the battery voltage and the battery current in the N groups of battery parameters are synchronous data, it is determined that the N groups of battery parameters are all valid parameters.
12. The method according to claim 11, characterized in that The determining whether a current step occurs in the N groups of battery parameters includes: When the battery currents of any two adjacent battery parameters from the battery current of the Mth battery parameter to the battery current of the Nth battery parameter are greater than a preset current threshold, it is determined that a current step occurs in the N groups of battery parameters, wherein M is a positive integer greater than 0, and M is less than N.
13. The method according to claim 11, characterized in that The determining whether the battery voltage and the battery current in the N groups of battery parameters are synchronous data includes: When the N groups of battery parameters meet all synchronization conditions, it is determined that the battery voltage and the battery current in the N groups of battery parameters are synchronized data, and the synchronization conditions include at least one of the following: the battery currents of the N groups are all discharge currents, the change in the battery voltage and the change in the battery current in two adjacent groups of battery parameters meet preset conditions, and the current battery power is different from the battery power recorded last time.
14. The method according to claim 11, characterized in that The determining whether the battery voltage and the battery current in the N groups of battery parameters are synchronous data includes: In a case where the N groups of battery parameters are sampled by the fuel gauge at a target sampling rate and stored in a cache of the terminal device, it is determined that the battery voltage and the battery current in the N groups of battery parameters are synchronous data.
15. The method according to claim 12, characterized in that Before determining whether a current step occurs in the N groups of battery parameters, the method further includes: Determine whether the battery currents of any two adjacent battery parameters in the battery currents of the first P groups of battery parameters are both less than the preset current threshold, where P is a positive integer greater than 0, and P is less than M; If so, determining whether the battery currents of any two adjacent battery parameters from the battery current of the P+1th group of battery parameters to the battery current of the Mth group of battery parameters are both greater than the preset current threshold; The determining whether a current step occurs in the N groups of battery parameters includes: If yes, it is determined whether a current step occurs in the N groups of battery parameters.
16. The method according to claim 8, characterized in that Before determining the compensation voltage according to the voltage difference between the first open-circuit voltage and the second open-circuit voltage, the method further includes: Determine whether the first open circuit voltage satisfies the voltage constraint: The determining the compensation voltage according to the voltage difference between the first open circuit voltage and the second open circuit voltage includes: When the first open circuit voltage satisfies the voltage constraint, a compensation voltage is determined according to a voltage difference between the first open circuit voltage and the second open circuit voltage.
17. The method according to claim 16, characterized in that The determining whether the first open circuit voltage satisfies a voltage constraint comprises: It is determined whether the first open circuit voltage is within a target voltage interval, where the target voltage interval is determined based on a terminal voltage of the battery, a resistance in a circuit, and a battery current.
18. The method according to claim 16, characterized in that Before determining whether the first open circuit voltage satisfies the voltage constraint, the method further includes: Determine whether the voltage difference between the maximum open circuit voltage and the minimum open circuit voltage is less than a preset voltage difference threshold, wherein after each set of battery parameters is input into the open circuit voltage calculation model, a pending open circuit voltage is obtained, the open circuit voltage set includes at least part of the pending open circuit voltages located at the rear in the order of obtaining the plurality of pending open circuit voltages, and the maximum open circuit voltage and the minimum open circuit voltage are the pending open circuit voltages in the open circuit voltage set; The determining whether the first open circuit voltage satisfies a voltage constraint comprises: When the voltage difference is less than a preset voltage difference threshold, it is determined whether the first open circuit voltage satisfies a voltage constraint.
19. The method according to claim 8, characterized in that Before obtaining the multiple groups of battery parameters of the terminal device, the method further includes: A preset operation is triggered, where the preset operation is used to cause a current step in the battery of the terminal device.
20. A device for displaying electric quantity, characterized in that: include: Parameter determination module, voltage adjustment module and power display module; The parameter determination module is used to determine the first open circuit voltage of the battery of the terminal device according to the battery parameters of the terminal device, and the battery parameters are used to characterize the battery circuit information of the terminal device; The voltage adjustment module is used to adjust the cut-off voltage of the power meter of the terminal device based on the first open-circuit voltage and the second open-circuit voltage detected by the power meter of the battery to obtain an adjusted cut-off voltage; The power display module is used to display the power of the terminal device according to the adjusted cut-off voltage.
21. A computer device comprising a memory and a processor, wherein the memory stores a computer program executable on the processor, wherein: When the processor executes the program, the steps of the method according to any one of claims 1 to 19 are implemented.
22. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 19 is implemented.
Citation Information
Cited By
Current anomaly test method and device, equipment, storage medium and program product
CN121186431A