Battery electric quantity metering method and device and chip
By collecting the voltage and current data of the battery, combining the pre-stored capacity and voltage information, the current battery power of the battery is calculated, and the problem of inaccurate power calculation caused by the failure of the integrated current sampling resistor in the prior art is solved, and a higher power is achieved Calculation accuracy.
Patent Information
- Application Number
- CN202411814910.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-10
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, when calculating battery power, the accuracy of power calculation is reduced due to the failure to integrate the sampling resistance at the current terminal of the battery.
By collecting the target voltage, target current, battery voltage and initial battery voltage of the target battery, combined with the pre-stored nominal capacity and nominal voltage, the current battery power of the battery is calculated. This method can quickly and accurately calculate the battery power without directly collecting current data.
The accuracy of battery power calculation is improved, and the reliability of battery power calculation can be ensured when the sampling resistor at the current terminal of the battery is not integrated in the circuit.
Smart Images

Figure CN119471434A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of battery technology, and in particular to a battery power measurement method, device and chip. Background Art
[0002] As portable devices such as smartphones, tablets, and mobile power supplies become increasingly popular, accurate estimation and measurement of battery power is crucial to improving user experience. Users rely on the remaining power information provided by the device to determine the battery life and whether charging is needed, thereby ensuring the continued normal operation of the device.
[0003] At present, the mainstream battery power measurement technology mainly relies on the analysis and calculation of the collected data of the battery's current and voltage. This method can theoretically provide relatively accurate power information, however, in practical applications, this technology faces certain limitations. In particular, in some battery application designs, due to cost, space or design complexity considerations, the sampling resistor at the battery current end is not integrated. This means that these devices cannot directly provide sampling data of the battery current, and thus cannot calculate the accurate battery power based on the battery current and voltage, resulting in a decrease in the accuracy of the calculated battery power. Summary of the invention
[0004] The purpose of this application is to provide a battery power measurement method, device and chip, which can improve the accuracy of the calculated battery power.
[0005] To achieve the above objectives, this application provides the following solutions:
[0006] In a first aspect, the present application provides a battery power measurement method, the method comprising:
[0007] Using the collected target voltage and target current of the target battery, the input and output power of the target battery are calculated;
[0008] Determining the charge and discharge efficiency of the target battery according to the input and output power and the collected battery voltage of the target battery;
[0009] Using the input and output power and the charge and discharge efficiency, calculate the battery terminal power of the target battery;
[0010] Using the pre-stored nominal capacity and nominal voltage of the target battery, the collected initial battery voltage of the target battery, and the battery terminal power, calculate the battery power capacity of the target battery at the current moment;
[0011] The current battery power of the target battery is calculated using the nominal capacity, the nominal voltage, and the battery power capacity at the current moment.
[0012] Optionally, the using the input and output power and the charge and discharge efficiency to calculate the battery terminal power of the target battery specifically includes:
[0013] Acquire the pre-stored battery internal resistance of the target battery;
[0014] Determining a charge and discharge compensation parameter of the target battery according to the battery internal resistance and the input and output power;
[0015] The battery terminal power of the target battery is calculated using the charge and discharge compensation parameter, the input and output power, and the charge and discharge efficiency.
[0016] Optionally, the using the pre-stored nominal capacity and nominal voltage of the target battery, the collected initial battery voltage of the target battery, and the battery terminal power to calculate the battery power capacity of the target battery at the current moment specifically includes:
[0017] Using the pre-stored nominal capacity and nominal voltage of the target battery, calculate the nominal power capacity of the target battery;
[0018] Determining an initial power level of the target battery based on the collected initial battery voltage of the target battery;
[0019] Using the initial power quantity and the nominal power capacity, calculate and obtain the initial power capacity of the target battery;
[0020] The current battery power capacity of the target battery is calculated using the initial power capacity and the battery terminal power.
[0021] Optionally, the calculation formula of the nominal power capacity is:
[0022] Qw_max = Qa*Vbat_rate;
[0023] Among them, Qw_max is the nominal power capacity, Qa is the nominal capacity, and Vbat_rate is the nominal voltage.
[0024] Optionally, the calculation formula of the initial power capacity is:
[0025] Qw_init=Pct_init*Qw_max;
[0026] Among them, Qw_init is the initial power capacity, Pct_init is the initial power, and Qw_max is the nominal power capacity.
[0027] Optionally, the calculation formula of the battery power capacity at the current moment is:
[0028] Qw_curr=Qw_init±∫(Pbat)dt;
[0029] Among them, Qw_curr is the battery power capacity at the current moment, Qw_init is the initial power capacity, and Pbat is the battery terminal power.
[0030] Optionally, the using the nominal capacity, the nominal voltage and the current battery power capacity to calculate the current battery power of the target battery specifically includes:
[0031] Using the nominal capacity and the nominal voltage, calculating the nominal power capacity of the target battery;
[0032] Using the nominal power capacity and the current battery power capacity, calculate the current battery power of the target battery;
[0033] And, the calculation formula of the current battery power is:
[0034] Pct_curr=Qw_curr*100 / Qw_max;
[0035] Among them, Pct_curr is the current battery power, Qw_curr is the battery power capacity at the current moment, and Qw_max is the nominal power capacity.
[0036] Optionally, if the target battery is in a discharging state, the method further includes:
[0037] Determining a discharge cut-off capacity of the target battery according to the battery internal resistance and the input and output power;
[0038] The available power of the target battery is calculated using the discharge cut-off power and the current battery power.
[0039] Optionally, the calculation formula for the available power is:
[0040] Pct_use=(Pct_curr-Pct_end)*100 / (100-Pct_end);
[0041] Among them, Pct_use is the available power, Pct_curr is the current battery power, and Pct_end is the discharge cut-off power.
[0042] In a second aspect, the present application provides a battery power metering device, the device comprising:
[0043] A first calculation unit, configured to calculate the input and output power of the target battery using the collected target voltage and target current of the target battery;
[0044] a determination unit, configured to determine the charge and discharge efficiency of the target battery according to the input and output power and the collected battery voltage of the target battery;
[0045] A second calculation unit, configured to calculate a battery terminal power of the target battery using the input and output power and the charge and discharge efficiency;
[0046] a third calculation unit, configured to calculate the battery power capacity of the target battery at a current moment by using the pre-stored nominal capacity and nominal voltage of the target battery, the collected initial battery voltage of the target battery, and the battery terminal power;
[0047] The fourth calculation unit is used to calculate the current battery power of the target battery by using the nominal capacity, the nominal voltage and the battery power capacity at the current moment.
[0048] In a third aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of any of the battery power measurement methods described above.
[0049] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-mentioned battery power measurement methods.
[0050] In a fifth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned battery power measurement methods.
[0051] In a sixth aspect, the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction. When the processor executes the program or instruction, the steps of the battery power measurement method described in any one of the above are implemented.
[0052] According to the specific embodiments provided in this application, this application discloses the following technical effects:
[0053] The present application provides a battery power metering method, device and chip, which does not need to collect the current data of the target battery, but only needs to collect the target voltage, target current, battery voltage and initial battery voltage of the target battery, and combine the pre-stored nominal capacity and nominal voltage of the target battery to calculate the current battery power of the target battery. It can be seen that this method can quickly calculate the current battery power of the target battery, and can also improve the accuracy of the current battery power calculation when the sampling resistor at the battery current end is not integrated in the circuit. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, 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.
[0055] Figure 1 A schematic diagram of a flow chart of a battery power measurement method according to an embodiment of the present application;
[0056] Figure 2 A schematic diagram of functional modules of a battery power metering device provided in one embodiment of the present application;
[0057] Figure 3 A schematic diagram of functional modules of a battery power metering system provided in one embodiment of the present application;
[0058] Figure 4 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0060] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.
[0061] In an exemplary embodiment, Figure 1As shown, a battery power measurement method is provided, which is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. In the embodiment of the present application, the following steps 101 to 105 are included. Among them:
[0062] Step 101: Use the collected target voltage and target current of the target battery to calculate the input and output power of the target battery.
[0063] In the embodiment of the present application, when the target battery is in a charging state or a discharging state, the current battery power of the target battery can be calculated.
[0064] In an embodiment of the present application, in the charging state, the target voltage and target current of the target battery can be the input voltage and input current, and the input and output power of the target battery can be the input power; in the discharging state, the target voltage and target current of the target battery can be the output voltage and output current, and the input and output power of the target battery can be the output power.
[0065] Specifically, in the charging state, the input power of the target battery can be calculated as follows:
[0066] Pin=Vin*Iin
[0067] Among them, Pin is the input power of the target battery, Vin is the target voltage (ie, input voltage), and Iin is the target current (ie, input current).
[0068] In the discharge state, the output power of the target battery can be calculated as:
[0069] Pout=Vout*Iout
[0070] Wherein, Pout is the output power of the target battery, Vout is the target voltage (ie, output voltage), and Iout is the target current (ie, output current).
[0071] Step 102: Determine the charge and discharge efficiency of the target battery according to the input and output power and the collected battery voltage of the target battery.
[0072] In the embodiment of the present application, in the charging state, the charge and discharge efficiency of the target battery may be the charging efficiency; in the discharging state, the target battery discharge efficiency may be the discharge efficiency.
[0073] In the embodiment of the present application, in the charging state, Table 1 (charging efficiency table) can be queried according to the input power and the battery voltage to obtain the charging efficiency ηin under this condition.
[0074] Table 1
[0075]
[0076] The charging efficiency table can be obtained based on the efficiency data of different input powers (P1, P2, ..., Pn) and battery voltages (V1, V2, ..., Vn) tested in practice.
[0077] In the discharge state, the discharge efficiency ηout under this condition can be obtained by looking up Table 2 (discharge efficiency table) according to the output power and the battery voltage.
[0078] Table 2
[0079]
[0080] The discharge efficiency table can be obtained based on the efficiency data of different output powers (P1, P2, ..., Pn) and battery voltages (V1, V2, ..., Vn) tested in practice.
[0081] Step 103: Use the input and output power and the charge and discharge efficiency to calculate the battery terminal power of the target battery.
[0082] In the embodiment of the present application, in the charging state, the calculation formula of the battery terminal power of the target battery can be:
[0083] Pbat=Pin*ηin
[0084] Wherein, Pbat can be the battery terminal power, Pin can be the input power, and ηin can be the charging efficiency. In the discharge state, the calculation formula of the battery terminal power of the target battery can be:
[0085] Pbat=Pout / ηout
[0086] Among them, Pbat can be the battery terminal power, Pout can be the output power, and ηout can be the discharge efficiency.
[0087] As an optional implementation manner, in step 103, the method of calculating the battery terminal power of the target battery using the input and output power and the charge and discharge efficiency may include:
[0088] Acquire the pre-stored battery internal resistance of the target battery;
[0089] Determining a charge and discharge compensation parameter of the target battery according to the battery internal resistance and the input and output power;
[0090] The battery terminal power of the target battery is calculated using the charge and discharge compensation parameter, the input and output power, and the charge and discharge efficiency.
[0091] Among them, when implementing this implementation method, since the battery voltage will rise or fall as a whole due to reasons such as battery internal resistance during charging and discharging, the calculated battery terminal power will also deviate. Therefore, compensation needs to be performed based on factors such as battery internal resistance. The charge and discharge compensation parameters of the target battery can be determined by the battery internal resistance and the input and output power, and then a more accurate battery terminal power of the target battery can be calculated based on the charge and discharge compensation parameters.
[0092] In the embodiment of the present application, during charging, the battery voltage will rise as a whole due to reasons such as the battery internal resistance, resulting in the calculated battery-end power being biased higher. Therefore, compensation needs to be performed based on factors such as the battery internal resistance. The charging compensation parameter Kin is related to the input power and the battery internal resistance. According to the input power and the battery internal resistance, query Table 3 (charging compensation parameter table) to obtain the charging compensation parameter Kin under this condition.
[0093] Table 3
[0094]
[0095] The charging compensation parameter table can be obtained based on the data of actual tests under different input powers (P1, P2, ..., Pn) and battery internal resistances (R1, R2, ..., Rn).
[0096] Specifically, obtain the internal resistance Rdcn of the battery. First, fully charge the battery, then discharge it with a small current (such as 0.05C, the corresponding power is smaller than P1) until the battery cut-off voltage, turn off the discharge, and accumulate the power capacity Qw_basic released at this time. This power capacity is used as the base power capacity of the battery. Then, fully charge the battery with the power Pn to be tested, and accumulate the power capacity Qw_pn charged at this time, that is, the power capacity that the battery can charge at the power Pn.
[0097] Then the charging compensation parameter Kinnn of the battery with internal resistance Rdcn at power Pn is calculated as:
[0098] Kinnn=Qw_basic / Qw_pn
[0099] In the embodiment of the present application, during discharge, the battery voltage will be pulled down as a whole due to reasons such as the battery internal resistance, resulting in the calculated battery terminal power being smaller, so compensation is required based on factors such as the battery internal resistance. The discharge compensation parameter Kout is related to the output power and the battery internal resistance. According to the output power and the battery internal resistance, query Table 4 (discharge compensation parameter table) to obtain the discharge compensation parameter Kout under this condition.
[0100] Table 4
[0101]
[0102] The discharge compensation parameter table can be obtained based on the data of actual tests under different output powers (P1, P2, ..., Pn) and battery internal resistances (R1, R2, ..., Rn).
[0103] Specifically, first fully charge the battery, then discharge it with a small current (such as 0.05C, the corresponding power is smaller than P1) until the cut-off voltage of the battery, turn off the discharge, and accumulate the power capacity Qw_basic released at this time. This power capacity is used as the base power capacity of the battery. Then fully charge the battery again, discharge the battery to the cut-off voltage with the power Pn to be tested, turn off the discharge, and accumulate the power capacity Qw_pn released at this time, that is, the power capacity that the battery can release at the Pn power. After waiting for the battery voltage to rebound, discharge the battery with a small current (such as 0.05C, the corresponding power is smaller than P1) until the cut-off voltage of the battery, turn off the discharge, and accumulate the power capacity Qw_bn released at this time, that is, the power capacity that can continue to be released with a small current after discharging at the Pout_pn power.
[0104] Then the discharge compensation parameter Koutnn of the battery with internal resistance Rdcn at power Pn is calculated as
[0105] Koutnn=(Qw_basic-Qw_bn) / Qw_pn
[0106] Therefore, in the charging state, using the charging compensation parameters, input power and charging efficiency, the calculation formula for calculating the battery terminal power of the target battery can be:
[0107] Pbat=Pin*Kin*ηin
[0108] Among them, Pbat can be the battery terminal power, Pin can be the input power, Kin can be the charging compensation parameter, and ηin can be the charging efficiency.
[0109] In the discharge state, the battery terminal power of the target battery can be calculated using the discharge compensation parameters, output power and discharge efficiency as follows:
[0110] Pbat=Pout*Kout / ηout
[0111] Among them, Pbat can be the battery terminal power, Pout can be the output power, Kout can be the discharge compensation parameter, and ηout can be the discharge efficiency.
[0112] Step 104 , using the pre-stored nominal capacity and nominal voltage of the target battery, the collected initial battery voltage of the target battery, and the battery terminal power, calculate the battery power capacity of the target battery at the current moment.
[0113] As an optional implementation manner, step 104 uses the pre-stored nominal capacity and nominal voltage of the target battery, the collected initial battery voltage of the target battery, and the battery terminal power to calculate the current battery power capacity of the target battery, which may include:
[0114] Using the pre-stored nominal capacity and nominal voltage of the target battery, calculate the nominal power capacity of the target battery;
[0115] Determining an initial power level of the target battery based on the collected initial battery voltage of the target battery;
[0116] Using the initial power quantity and the nominal power capacity, calculate and obtain the initial power capacity of the target battery;
[0117] The current battery power capacity of the target battery is calculated using the initial power capacity and the battery terminal power.
[0118] Among them, by implementing this embodiment, the nominal power capacity can be calculated based on the pre-stored nominal capacity and nominal voltage of the target battery, and the initial power capacity of the target battery can be determined based on the initial battery voltage of the target battery. Then, the battery power capacity of the target battery at the current moment can be calculated based on the nominal power capacity and the initial power capacity, so that the battery power capacity at the current moment obtained is more accurate.
[0119] Optionally, the nominal power capacity is calculated as:
[0120] Qw_max = Qa*Vbat_rate;
[0121] Among them, Qw_max is the nominal power capacity, Qa is the nominal capacity, and Vbat_rate is the nominal voltage.
[0122] For example, if the nominal capacity of the target battery is 10000mAh and the nominal voltage is 3.7V, then the nominal power capacity of the target battery is 37000mWh.
[0123] Optionally, the initial power capacity is calculated as:
[0124] Qw_init=Pct_init*Qw_max;
[0125] Among them, Qw_init is the initial power capacity, which can be obtained by linear interpolation of the initial battery voltage of the battery module and the OCV curve of the battery voltage and power, Pct_init is the initial power, and Qw_max is the nominal power capacity.
[0126] Optionally, the calculation formula for the battery power capacity at the current moment is:
[0127] Qw_curr=Qw_init±∫(Pbat)dt;
[0128] Among them, Qw_curr is the battery power capacity at the current moment, Qw_init is the initial power capacity, and Pbat is the battery terminal power.
[0129] Specifically, in the charging state, the calculation formula of the battery power capacity at the current moment is:
[0130] Qw_curr=Qw_init+∫(Pbat)dt
[0131] In the discharge state, the calculation formula of the battery power capacity at the current moment is:
[0132] Qw_curr=Qw_init-∫(Pbat)dt
[0133] Step 105 , using the nominal capacity, the nominal voltage and the current battery power capacity, calculate the current battery power of the target battery.
[0134] As an optional implementation manner, in step 105, the method of calculating the current battery power of the target battery using the nominal capacity, the nominal voltage, and the current battery power capacity may include:
[0135] Using the nominal capacity and the nominal voltage, calculating the nominal power capacity of the target battery;
[0136] Using the nominal power capacity and the current battery power capacity, calculate the current battery power of the target battery;
[0137] And, the calculation formula of the current battery power is:
[0138] Pct_curr=Qw_curr*100 / Qw_max;
[0139] Among them, Pct_curr is the current battery power, Qw_curr is the battery power capacity at the current moment, and Qw_max is the nominal power capacity.
[0140] In the embodiments of the present application, when the battery is discharged, due to factors such as internal resistance, when the battery voltage drops to the discharge cut-off voltage, part of the battery power cannot be discharged. This part of the power that cannot be discharged is called the cut-off power, and the corresponding power that can be discharged is called the available power. Therefore, it is necessary to calculate the available power that the battery can actually discharge.
[0141] As an optional implementation, if the target battery is in a discharging state, the following steps may also be performed:
[0142] Determining a discharge cut-off capacity of the target battery according to the battery internal resistance and the input and output power;
[0143] The available power of the target battery is calculated using the discharge cut-off power and the current battery power.
[0144] Among them, when implementing this implementation method, since the battery will not discharge all the electricity in the battery during the discharge process, the discharge cut-off power of the target battery can be determined according to the battery internal resistance and output power, and the available power of the target battery can be calculated by the discharge cut-off power and the current battery power, so that the user of the target battery can obtain the actual available power of the target battery more directly.
[0145] In the embodiment of the present application, the cut-off power is related to the battery output power and internal resistance. According to the output power and the battery internal resistance, Table 5 (discharge cut-off power table) is queried to obtain the discharge cut-off power Pct_end under this condition.
[0146] Table 5
[0147]
[0148] The discharge end capacity table can be obtained based on the actual test data of different output powers (P1, P2, ..., Pn) and battery internal resistances (R1, R2, ..., Rn). The test data is the same as the test data of the discharge compensation parameters. The discharge end capacity Pct_endnn of the battery with Pn power and internal resistance Rdcn is calculated as follows:
[0149] Pct_endnn=Qw_sn / Qw_basic
[0150] In the embodiment of the present application, the calculation formula for available power is:
[0151] Pct_use=(Pct_curr-Pct_end)*100 / (100-Pct_end);
[0152] Among them, Pct_use is the available power, Pct_curr is the current battery power, and Pct_end is the discharge cut-off power.
[0153] By implementing the above steps 101 to 105, the current battery capacity of the target battery can be quickly calculated, and the accuracy of the current battery capacity calculation can be improved when the sampling resistor of the battery current terminal is not integrated in the circuit. The present application can also calculate a more accurate battery terminal power of the target battery, so that the battery power capacity obtained at the current moment is more accurate. In addition, the present application can also enable the user of the target battery to obtain the actual available power of the target battery more directly.
[0154] Based on the same inventive concept, the embodiment of the present application also provides a battery power metering device for implementing the battery power metering method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the embodiments of one or more battery power metering devices provided below can refer to the limitations of the battery power metering method above, and will not be repeated here.
[0155] In an exemplary embodiment, Figure 2 As shown, a battery power metering device is provided. Please refer to Figure 3 , Figure 3 A functional module diagram of a battery power metering system provided in one embodiment of the present application; Figure 2 The battery fuel gauge shown is equivalent to Figure 3 The power measurement module in .
[0156] Specifically, Figure 3 The battery power metering system shown includes an input port, an input sampling resistor, a charging module, an output port, an output sampling resistor, a discharge module, a battery module, a data acquisition module and a power metering module; the input sampling resistor is connected to the input port and the charging module respectively, the output sampling resistor is connected to the output port and the discharge module respectively, the battery module is connected to the charging module, the discharge module and the data acquisition module respectively, and the data acquisition module is also connected to both ends of the input sampling resistor and the output sampling resistor respectively, wherein:
[0157] The charging module is used to charge the battery module. The charging module can draw power from the input port to charge the battery module. The charging voltage and charging current can be set according to actual needs. The input sampling resistor can collect the input current entering the charging module.
[0158] The discharge module is used to discharge the battery module. The discharge module can draw power from the battery module and supply power to the output port. The discharge voltage and discharge current can be set according to actual needs. The output sampling resistor can collect the output current of the discharge module.
[0159] The data acquisition module is used to collect the input current of the input sampling resistor, the input voltage of the input port, the output current of the output sampling resistor, the output voltage of the output port and the battery voltage of the battery module, and transmit the input current, input voltage, output current, output voltage and battery voltage to the power metering module.
[0160] In an embodiment of the present application, the data acquisition module can collect the voltage across the input sampling resistor and convert the voltage across the input sampling resistor into an input current; the data acquisition module can also collect the voltage across the output sampling resistor and convert the voltage across the output sampling resistor into an output current.
[0161] The power metering module can estimate the battery power of the battery module according to the input voltage, input current, output voltage, output current and battery voltage collected by the data acquisition module.
[0162] Figure 2 The battery fuel gauge device shown includes:
[0163] A first calculation unit 201 is used to calculate the input and output power of the target battery using the collected target voltage and target current of the target battery;
[0164] A determination unit 202, configured to determine the charge and discharge efficiency of the target battery according to the input and output power and the collected battery voltage of the target battery;
[0165] A second calculation unit 203 is used to calculate the battery terminal power of the target battery using the input and output power and the charge and discharge efficiency;
[0166] The third calculation unit 204 is used to calculate the battery power capacity of the target battery at the current moment by using the pre-stored nominal capacity and nominal voltage of the target battery, the collected initial battery voltage of the target battery, and the battery terminal power;
[0167] The fourth calculation unit 205 is configured to calculate the current battery power of the target battery by using the nominal capacity, the nominal voltage and the battery power capacity at the current moment.
[0168] As an optional implementation manner, the second calculation unit 203 uses the input and output power and the charge and discharge efficiency to calculate the battery terminal power of the target battery in the following manner:
[0169] Acquire the pre-stored battery internal resistance of the target battery;
[0170] Determining a charge and discharge compensation parameter of the target battery according to the battery internal resistance and the input and output power;
[0171] The battery terminal power of the target battery is calculated using the charge and discharge compensation parameter, the input and output power, and the charge and discharge efficiency.
[0172] Among them, when implementing this implementation method, since the battery voltage will rise or fall as a whole due to reasons such as battery internal resistance during charging and discharging, the calculated battery terminal power will also deviate. Therefore, compensation needs to be performed based on factors such as battery internal resistance. The charge and discharge compensation parameters of the target battery can be determined by the battery internal resistance and the input and output power, and then a more accurate battery terminal power of the target battery can be calculated based on the charge and discharge compensation parameters.
[0173] As an optional implementation manner, the third calculation unit 204 uses the pre-stored nominal capacity and nominal voltage of the target battery, the collected initial battery voltage of the target battery, and the battery terminal power to calculate the current moment battery power capacity of the target battery in the following manner:
[0174] Using the pre-stored nominal capacity and nominal voltage of the target battery, calculate the nominal power capacity of the target battery;
[0175] Determining an initial power level of the target battery based on the collected initial battery voltage of the target battery;
[0176] Using the initial power quantity and the nominal power capacity, calculate and obtain the initial power capacity of the target battery;
[0177] The current battery power capacity of the target battery is calculated using the initial power capacity and the battery terminal power.
[0178] Among them, by implementing this embodiment, the nominal power capacity can be calculated based on the pre-stored nominal capacity and nominal voltage of the target battery, and the initial power capacity of the target battery can be determined based on the initial battery voltage of the target battery. Then, the battery power capacity of the target battery at the current moment can be calculated based on the nominal power capacity and the initial power capacity, so that the battery power capacity at the current moment obtained is more accurate.
[0179] Optionally, the nominal power capacity is calculated as:
[0180] Qw_max = Qa*Vbat_rate;
[0181] Among them, Qw_max is the nominal power capacity, Qa is the nominal capacity, and Vbat_rate is the nominal voltage.
[0182] Optionally, the initial power capacity is calculated as:
[0183] Qw_init=Pct_init*Qw_max;
[0184] Among them, Qw_init is the initial power capacity, Pct_init is the initial power, and Qw_max is the nominal power capacity.
[0185] Optionally, the calculation formula for the battery power capacity at the current moment is:
[0186] Qw_curr=Qw_init±∫(Pbat)dt;
[0187] Among them, Qw_curr is the battery power capacity at the current moment, Qw_init is the initial power capacity, and Pbat is the battery terminal power.
[0188] As an optional implementation manner, the fourth calculation unit 205 uses the nominal capacity, the nominal voltage, and the current battery power capacity to calculate the current battery power of the target battery in the following manner:
[0189] Using the nominal capacity and the nominal voltage, calculating the nominal power capacity of the target battery;
[0190] Using the nominal power capacity and the current battery power capacity, calculate the current battery power of the target battery;
[0191] And, the calculation formula of the current battery power is:
[0192] Pct_curr=Qw_curr*100 / Qw_max;
[0193] Among them, Pct_curr is the current battery power, Qw_curr is the battery power capacity at the current moment, and Qw_max is the nominal power capacity.
[0194] As an optional implementation, the fourth calculation unit 205 may also be used for:
[0195] If the target battery is in a discharging state, determining a discharge cut-off capacity of the target battery according to the battery internal resistance and the input and output power;
[0196] The available power of the target battery is calculated using the discharge cut-off power and the current battery power.
[0197] Among them, when implementing this implementation method, since the battery will not discharge all the electricity in the battery during the discharge process, the discharge cut-off power of the target battery can be determined according to the battery internal resistance and the input and output power. The available power of the target battery can be calculated by the discharge cut-off power and the current battery power, so that the user of the target battery can obtain the actual available power of the target battery more directly.
[0198] Optionally, the available power is calculated as:
[0199] Pct_use=(Pct_curr-Pct_end)*100 / (100-Pct_end);
[0200] Among them, Pct_use is the available power, Pct_curr is the current battery power, and Pct_end is the discharge cut-off power.
[0201] By implementing the above implementation, the current battery power of the target battery can be quickly calculated, and the accuracy of the current battery power calculation can be improved when the sampling resistor at the battery current end is not integrated in the circuit. In addition, the present application can also calculate a more accurate battery terminal power of the target battery. In addition, the present application can also make the current battery power capacity obtained more accurate. In addition, the present application can also enable the user of the target battery to obtain the actual available power of the target battery more directly.
[0202] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 4 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store video tag processing data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a battery power metering method is implemented.
[0203] Those skilled in the art will understand that Figure 4The 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.
[0204] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.
[0205] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0206] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.
[0207] In an exemplary embodiment, a chip is provided, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the steps in the above-mentioned method embodiments and achieve the same technical effects. To avoid repetition, they are not described here.
[0208] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0209] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0210] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).
[0211] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0212] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.
Claims
1. A battery power measurement method, characterized in that: The method comprises: Using the collected target voltage and target current of the target battery, the input and output power of the target battery are calculated; Determining the charge and discharge efficiency of the target battery according to the input and output power and the collected battery voltage of the target battery; Using the input and output power and the charge and discharge efficiency, calculate the battery terminal power of the target battery; Using the pre-stored nominal capacity and nominal voltage of the target battery, the collected initial battery voltage of the target battery, and the battery terminal power, calculate the battery power capacity of the target battery at the current moment; The current battery power of the target battery is calculated using the nominal capacity, the nominal voltage, and the battery power capacity at the current moment.
2. The battery power measurement method according to claim 1, characterized in that: The using the input and output power and the charge and discharge efficiency to calculate the battery terminal power of the target battery specifically includes: Acquire the pre-stored battery internal resistance of the target battery; Determining a charge and discharge compensation parameter of the target battery according to the battery internal resistance and the input and output power; The battery terminal power of the target battery is calculated using the charge and discharge compensation parameter, the input and output power, and the charge and discharge efficiency.
3. The battery power measurement method according to claim 1, characterized in that: The using the pre-stored nominal capacity and nominal voltage of the target battery, the collected initial battery voltage of the target battery, and the battery terminal power to calculate the current battery power capacity of the target battery specifically includes: Using the pre-stored nominal capacity and nominal voltage of the target battery, calculate the nominal power capacity of the target battery; Determining an initial power level of the target battery based on the collected initial battery voltage of the target battery; Using the initial power quantity and the nominal power capacity, calculate and obtain the initial power capacity of the target battery; The current battery power capacity of the target battery is calculated using the initial power capacity and the battery terminal power.
4. The battery power measurement method according to claim 3, characterized in that: The calculation formula for the nominal power capacity is: Qw_max = Qa*Vbat_rate; Among them, Qw_max is the nominal power capacity, Qa is the nominal capacity, and Vbat_rate is the nominal voltage.
5. The battery power measurement method according to claim 3, characterized in that: The calculation formula of the initial power capacity is: Qw_init=Pct_init*Qw_max; Among them, Qw_init is the initial power capacity, Pct_init is the initial power, and Qw_max is the nominal power capacity.
6. The battery power measurement method according to claim 3, characterized in that: The calculation formula of the battery power capacity at the current moment is: Qw_curr=Qw_init±∫(Pbat)dt; Among them, Qw_curr is the battery power capacity at the current moment, Qw_init is the initial power capacity, and Pbat is the battery terminal power.
7. The battery power measurement method according to claim 1, characterized in that: The using the nominal capacity, the nominal voltage and the current battery power capacity to calculate the current battery power of the target battery specifically includes: Using the nominal capacity and the nominal voltage, calculating the nominal power capacity of the target battery; Using the nominal power capacity and the current battery power capacity, calculate the current battery power of the target battery; And, the calculation formula of the current battery power is: Pct_curr=Qw_curr*100 / Qw_max; Among them, Pct_curr is the current battery power, Qw_curr is the battery power capacity at the current moment, and Qw_max is the nominal power capacity.
8. The battery power measurement method according to claim 2, characterized in that: If the target battery is in a discharging state, the method further includes: Determining a discharge cut-off capacity of the target battery according to the battery internal resistance and the input and output power; The available power of the target battery is calculated using the discharge cut-off power and the current battery power.
9. The battery power measurement method according to claim 8, characterized in that: The calculation formula of the available power is: Pct_use=(Pct_curr-Pct_end)*100 / (100-Pct_end); Among them, Pct_use is the available power, Pct_curr is the current battery power, and Pct_end is the discharge cut-off power.
10. A battery power metering device, characterized in that: The device comprises: A first calculation unit, configured to calculate the input and output power of the target battery using the collected target voltage and target current of the target battery; a determination unit, configured to determine the charge and discharge efficiency of the target battery according to the input and output power and the collected battery voltage of the target battery; A second calculation unit, configured to calculate a battery terminal power of the target battery using the input and output power and the charge and discharge efficiency; a third calculation unit, configured to calculate the battery power capacity of the target battery at a current moment by using the pre-stored nominal capacity and nominal voltage of the target battery, the collected initial battery voltage of the target battery, and the battery terminal power; The fourth calculation unit is used to calculate the current battery power of the target battery by using the nominal capacity, the nominal voltage and the battery power capacity at the current moment.
11. A chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, characterized in that: The processor is used to run a program or an instruction, and when the processor executes the program or the instruction, the battery power measurement method according to any one of claims 1 to 9 is implemented.