Electric quantity metering circuit and method, chip, battery management system and electronic equipment
By waking up the analog-to-digital conversion module and the low-power first calculation module through a timed module to calculate power data in real time, and by waking up the high-power second calculation module at intervals, the problem of high power consumption of the battery management chip is solved, and the accuracy of power measurement and battery life are improved.
Patent Information
- Application Number
- CN202510904678.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-01
- Publication Date
- 2025-11-28
AI Technical Summary
Existing battery management chips, while ensuring accurate power metering, consume relatively high power, resulting in shorter battery life for electronic devices.
The system employs a timing module to wake up the analog-to-digital conversion module and the calculation module, periodically measures battery voltage and current data, uses a low-power first calculation module to calculate cycle power data, and wakes up a high-power second calculation module at regular intervals to calculate total power data.
This reduces the power consumption of battery power metering while ensuring the accuracy of power metering, thereby extending the usage time of electronic devices.
Smart Images

Figure CN121027882A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of battery technology, specifically to a power metering circuit, method, chip, battery management system, and electronic device. Background Technology
[0002] Currently, traditional battery management chips mainly include functions such as battery voltage and current measurement, overvoltage / undervoltage protection, overcurrent protection, and power statistics. For battery management chips, the chip's own power consumption is a relatively important indicator. Low-power chips are of great significance for mobile devices such as laptops and mobile phones. The power consumption of the battery management chip determines the final product's battery life to a certain extent.
[0003] In related technologies, to ensure accurate power metering, battery management chips typically operate with a 250ms wake-up cycle. The core is woken up every 250ms to read the battery's voltage and current data and calculate the power level. This calculation takes approximately 10ms. The core then re-enters sleep mode to reduce system power consumption and awaits the next wake-up. However, waking the core every 250ms to ensure accurate power metering leads to increased power consumption in the battery management chip. For example, with the Cortex-M0 core, the core's power consumption accounts for approximately 40% to 60% of the overall battery management chip's power consumption.
[0004] Therefore, how to reduce power consumption while ensuring the accuracy of power metering has become a focus of effort for those skilled in the art. Summary of the Invention
[0005] In view of the above problems, embodiments of this application provide a power metering circuit, method, chip, battery management system, and electronic device to solve the above technical problems.
[0006] In a first aspect, embodiments of this application provide a power metering circuit for measuring the power of a battery module, comprising:
[0007] The timing module outputs a first signal in each measurement cycle.
[0008] The analog-to-digital conversion module is used to measure the voltage and current data of the battery module in each measurement cycle in response to the first signal.
[0009] The first calculation module is used to calculate the cycle power data based on voltage data and current data in each measurement cycle, and to determine the first total power data corresponding to the current measurement cycle based on the cycle power data and historical power data.
[0010] In this configuration, the first total power data determined by the first calculation module every N measurement cycles is configured to be handed over to the second calculation module to calculate and determine the second total power data, and the power consumption per unit time of the first calculation module is less than the power consumption per unit time of the second calculation module, where N is an integer greater than or equal to 2.
[0011] Secondly, this application provides a method for measuring electricity consumption, including:
[0012] The voltage and current data of the battery module are measured in each measurement cycle;
[0013] In each measurement cycle, the cycle power data is calculated based on voltage and current data, and in each measurement cycle, the first total power data corresponding to the current measurement cycle is determined based on the cycle power data and historical power data.
[0014] Every N measurement cycles, a second total energy data is determined based on the first total energy data, where N is an integer greater than or equal to 2;
[0015] The first total power consumption data is determined based on the first calculation module, the second total power consumption data is determined based on the second calculation module, and the power consumption per unit time of the first calculation module is less than that of the second calculation module.
[0016] Thirdly, this application provides a chip including the power metering circuit as described in the first aspect.
[0017] Fourthly, this application provides a battery management system, including the chip described in the third aspect.
[0018] Fifthly, embodiments of this application also provide an electronic device, including the aforementioned chip or battery management system.
[0019] In this embodiment, the second calculation module is in deep sleep during other measurement cycles and is only awakened in the Nth measurement cycle to calculate the second total power data. The first calculation module calculates the cycle power data and the first total power data corresponding to the current measurement cycle in each measurement cycle. Considering that the power consumption per unit time of the first calculation module is less than that of the second calculation module, this application uses the lower power consumption of the first calculation module to calculate the power data in each measurement cycle. Finally, the second calculation module calculates the remaining power of the battery. This not only ensures the accuracy of power measurement without losing voltage and current data, but also reduces the power consumption of battery power measurement, thereby helping to extend the usage time of electronic devices.
[0020] These or other aspects of this application will become more apparent in the following description of the embodiments. Attached Figure Description
[0021] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0022] Figure 1 A schematic diagram of a battery management chip in related technologies is shown.
[0023] Figure 2 This diagram illustrates a cycle of power metering in a battery management chip in related technologies.
[0024] Figure 3 A schematic diagram of a power metering circuit in an embodiment of this application is shown.
[0025] Figure 4 This illustration shows a schematic diagram of multiple measurement cycles of electricity measurement in an embodiment of this application.
[0026] Figure 5 This paper presents another schematic diagram of electricity metering for multiple measurement cycles in an embodiment of this application.
[0027] Figure 6 Another schematic diagram of the power metering circuit in this application is shown.
[0028] Figure 7 This paper presents another schematic diagram of electricity metering for multiple measurement cycles in an embodiment of this application.
[0029] Figure 8 A schematic diagram of a first computing module in an embodiment of this application is shown.
[0030] Figure 9 Another schematic diagram of the first computing module in an embodiment of this application is shown.
[0031] Figure 10 Another schematic diagram of the first computing module in an embodiment of this application is shown.
[0032] Figure 11 A schematic flowchart of an electricity metering method in an embodiment of this application is shown.
[0033] Among them, 100 is the power metering circuit, 10 is the timing module, 20 is the analog-to-digital conversion module, 21 is the first analog-to-digital converter, 22 is the second analog-to-digital converter, 30 is the first calculation module, 31 is the first multiplication unit, 32 is the first integration unit, 33 is the first calibration unit, 34 is the second calibration unit, 35 is the first code value conversion unit, 36 is the second code value conversion unit, and 200 is the second calculation module. Detailed Implementation
[0034] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.
[0035] To enable those skilled in the art to better understand the solutions of this application, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without creative effort are within the scope of protection of this application.
[0036] In the embodiments of this application, it should be noted that, in this document, relational terms such as first and second are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations.
[0037] Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0038] In the description of the embodiments of this application, the words "example" or "for example" are used to indicate exemplification, illustration, or description. Any embodiment or design described as "example" or "for example" in the embodiments of this application is not to be construed as being more preferred or having more advantages than another embodiment or design. The use of the words "example" or "for example" is intended to present relative concepts in a clear manner.
[0039] Furthermore, in the embodiments of this application, "multiple" refers to two or more. Therefore, in the embodiments of this application, "multiple" can also be understood as "at least two". "At least one" can be understood as one or more, such as one, two, or more. For example, including at least one means including one, two, or more, and is not limited to which ones are included. For example, including at least one of A, B, and C, then it could include A, B, C, A and B, A and C, B and C, or A and B and C.
[0040] It should be noted that in the embodiments of this application, "connection" can be understood as electrical connection. The connection between two electrical components can be a direct or indirect connection between the two electrical components. For example, the connection between A and B can be a direct connection between A and B, or an indirect connection between A and B through one or more other electrical components.
[0041] Currently, battery management chips calculate battery capacity by measuring battery voltage and current. For example, a battery management chip can be formed by co-packing an AFE (Analog Front End) chip and an MCU (Microcontroller Unit) chip. (See [link to relevant documentation]). Figure 1 , Figure 1 The diagram illustrates a battery management chip in the related art, wherein the battery management chip includes an AFE chip and an MCU chip, wherein the AFE chip includes a communication interface circuit, a voltage analog-to-digital converter (VADC), a current analog-to-digital converter (CCADC), and a timer.
[0042] The timer wakes up the voltage analog-to-digital converter (VADC), current analog-to-digital converter (CCADC), and MCU chip at regular intervals via the bus. After being woken up, the VADC and CCADC measure the battery voltage and current. After being woken up, the MCU chip reads the measurement data of the VADC and CCADC through the communication interface circuit to calculate the battery power.
[0043] For example, see Figure 2 , Figure 2 This diagram illustrates a cycle of battery power measurement in a battery management chip within a related technology. A timer wakes up the voltage analog-to-digital converter (VADC), current analog-to-digital converter (CCADC), and the MCU chip every 250ms. After being woken up, the VADC measures the battery voltage within time t2, then sleeps for 250ms-t2, waiting for the next wake-up. Similarly, the CCADC measures the battery current within time t3, then sleeps for 250ms-t3, waiting for the next wake-up. The MCU chip calculates the battery power using its core clock frequency within time t1, then sleeps for 250ms-t1, waiting for the next wake-up. Based on the power calculation formula, the battery power consumed (WT) in each 250ms cycle is:
[0044] WT = V * I * 250ms
[0045] Where V is the battery voltage measured by the voltage analog-to-digital converter (VADC), and I is the battery current measured by the current analog-to-digital converter (CCADC).
[0046] Therefore, the remaining battery power is:
[0047] W1 = W0 - WT = W0 - V * I * 250ms
[0048] Where W0 is the remaining battery power before the measurement cycle, and W1 is the remaining battery power in the current measurement cycle.
[0049] According to the formula for calculating battery power consumption per 250ms cycle, the battery voltage and current in the formula are only instantaneous values. Therefore, it is necessary to perform a voltage and current measurement within a short cycle (e.g., 250ms) to ensure the accuracy of power measurement. In other words, the relevant technology needs to wake up the voltage analog-to-digital converter (VADC), current analog-to-digital converter (CCADC), and MCU chip within a short cycle (e.g., 250ms).
[0050] However, waking up the core every 250ms to ensure accurate power metering leads to increased power consumption in the battery management chip. Therefore, this application provides a power metering circuit, method, chip, battery management system, and electronic device, which are described in detail below.
[0051] First, refer to Figure 3 , Figure 3 The diagram shows a schematic of a power metering circuit 100 in an embodiment of this application. The power metering circuit 100 is used to measure the power of a battery module. The battery module may include, but is not limited to, energy storage batteries such as carbon zinc batteries, alkaline batteries, lithium batteries, lead-acid batteries or nickel-metal hydride batteries. The power metering circuit 100 includes a timing module 10, an analog-to-digital conversion module 20 and a first calculation module 30.
[0052] Specifically, the timing module 10 can output a first signal in each measurement cycle. The first signal can wake up the analog-to-digital converter module 20, so that after the analog-to-digital converter module 20 is woken up, it measures the voltage and current data of the battery module in each measurement cycle.
[0053] In some embodiments of this application, the timing module 10 may include a first counter that counts a clock signal. A high level in each cycle of the clock signal increments the first counter by 1. When the count value of the first counter reaches a set value, the first counter outputs a pulse signal as a first signal to wake up the analog-to-digital conversion module 20. For example, assuming the period of the clock signal is T, and the first counter counts to M and outputs a pulse signal as the first signal, the duration corresponding to the measurement period is M*T.
[0054] It is understood that the implementation of timing module 10 is not limited to this. For example, timing module 10 may include a dedicated timer (e.g., a 555 timer), or timing module 10 may include an RC timing circuit.
[0055] The analog-to-digital conversion module 20 is used to measure the voltage and current data of the battery module in each measurement cycle in response to a first signal, so that the first calculation module 30 can calculate the power data based on the voltage and current data. In some embodiments of this application, the analog-to-digital conversion module 20 may include a single analog-to-digital converter (ADC) that sequentially measures the voltage and current data of the battery module. For example, the ADC measures the voltage data first and then the current data in each measurement cycle, or vice versa. In some embodiments of this application, the analog-to-digital conversion module 20 may include multiple ADCs, where one ADC measures the voltage data of the battery module and another ADC measures the current data of the battery module.
[0056] For example, the analog-to-digital conversion module 20 may be a hybrid analog-to-digital converter consisting of one or more of the following: successive approximation ADC (SAR ADC), Sigma-delta ADC (SD ADC), pipeline ADC, or ramp-compare ADC.
[0057] It is understood that the analog-to-digital converter module 20 may also include other circuits that process the voltage and current signals of the battery module. For example, the analog-to-digital converter module 20 may also include a signal amplification circuit to amplify the voltage and current signals, thereby improving the signal-to-noise ratio of the voltage and current signals of the battery module.
[0058] The first calculation module 30 is used to calculate the cycle power data based on voltage data and current data in each measurement cycle, and to determine the first total power data corresponding to the current measurement cycle based on the cycle power data and historical power data.
[0059] In some embodiments of this application, the first calculation module 30 can calculate cycle power data and a first total power data corresponding to the current measurement cycle using voltage and current data from the previous measurement cycle in each measurement cycle.
[0060] It should be noted that the unit of the periodic power data can be kilowatt or kilowatt-hour. For example, the first calculation module 30 can calculate the periodic power data in each measurement cycle according to the following formula:
[0061] W T =U*I
[0062] Among them, W T For periodic electrical data, U represents voltage data, and I represents current data.
[0063] For example, the first calculation module 30 can calculate the cycle power data in each measurement cycle according to the following formula:
[0064] W T =U*I*T0
[0065] Where T0 is the duration corresponding to the measurement cycle.
[0066] Historical power data refers to the first total power data determined by the first calculation module 30 in the previous measurement cycle. For example, for the Nth measurement cycle, the first total power data determined by the first calculation module 30 in the N-1th measurement cycle is the historical power data; or for the N-1th measurement cycle, the first total power data determined by the first calculation module 30 in the N-2th measurement cycle is the historical power data.
[0067] Similarly, the unit of the first total power data can be kilowatts or kilowatt-hours. For example, the first total power data determined by the first calculation module 30 in the Nth measurement cycle satisfies the following relationship:
[0068] W NT =W N-1T+ U N *I N
[0069] W NT =U I *I1+U2*I2+...+U N *I N
[0070] Among them, W NT The first total power data, W, determined by the first calculation module 30 in the Nth measurement cycle. N-1T The first calculation module 30 determines the first total power data (i.e., historical power data) in the N-1th measurement cycle, U I U2...U N For the voltage data output by the analog-to-digital converter module 20 from the 1st to the Nth measurement cycle, I I I2...I NThis refers to the current data output by the analog-to-digital converter module 20 during the first to Nth measurement cycles.
[0071] For example, the first total power data determined by the first calculation module 30 in the Nth measurement cycle satisfies the following relationship:
[0072] W NT =(W N-1T+ U N *I N )*T0
[0073] W NT =(U I *I1+U2*I2+...+U N *I N )*T0
[0074] In this embodiment of the application, the first total power data determined by the first calculation module 30 every N measurement cycles is configured to be handed over to the second calculation module 200 to calculate and determine the second total power data, where N is an integer greater than or equal to 2.
[0075] For example, in an embodiment where the unit of the first total power data is kilowatts, the second calculation module 200 can calculate the second total power data according to the following formula.
[0076] W2 = W NT *T0
[0077] As can be seen, the second total power data calculated in the above formula is the power consumed by the battery module in those N measurement cycles.
[0078] For example, in an embodiment where the unit of the first total power consumption data is kilowatt-hours, the second calculation module 200 can calculate the second total power consumption data according to the following formula:
[0079] W2 = W0 - W NT
[0080] Where W0 represents the battery level.
[0081] As can be seen, the second total power data calculated in the above formula is the remaining power of the battery module after the N measurement cycles.
[0082] It should be noted that, in this embodiment, the power consumption per unit time of the first computing module 30 is less than that of the second computing module 200. For example, the first computing module 30 may include digital logic operation circuits such as multipliers and adders, and the second computing module 200 may refer to, but is not limited to, circuits with complex computing capabilities such as processor cores, MCU chips, or SoC chips. Since the first computing module 30 normally measures the power data of each measurement cycle to ensure that no data is lost, and the power consumption per unit time of the first computing module 30 is less than that of the second computing module 200, this application can not only ensure the power measurement accuracy of the battery module, but also reduce the power measurement power consumption of the battery module.
[0083] For example, taking a measurement period of 250ms as an example, see [link / reference]. Figure 4 , Figure 4 This illustration shows a schematic diagram of power metering for multiple measurement cycles in an embodiment of this application. The analog-to-digital conversion module 20 measures voltage and current data within time t01 of each measurement cycle. The first calculation module 30 calculates the cycle power data and the first total power data corresponding to the current measurement cycle within time t02 of each measurement cycle. After N measurement cycles, the second calculation module 200 reads the first total power data corresponding to the Nth measurement cycle from the first calculation module 30 within time t03 of the Nth measurement cycle and calculates the second total power data.
[0084] It can be seen that the second calculation module 200 is in a deep sleep state during other measurement cycles, and is only awakened in the Nth measurement cycle to calculate the second total power data. The first calculation module 30 calculates the cycle power data and the first total power data corresponding to the current measurement cycle in each measurement cycle. Considering that the power consumption per unit time of the first calculation module 30 is less than that of the second calculation module 200, it can be seen that this application uses the lower power consumption of the first calculation module 30 to calculate the power data in each measurement cycle without losing data. Finally, the second calculation module 200 calculates the remaining power of the battery module. This not only ensures the accuracy of power measurement, but also reduces the power consumption of battery power measurement, thereby helping to extend the usage time of electronic devices.
[0085] Combination Figure 3 or Figure 6 In some embodiments of this application, the power metering circuit 100 may further include a second calculation module 200, which is used to determine a second total power data based on the first total power data determined by the first calculation module 30 in every N measurement cycles.
[0086] It should be noted that, taking the second computing module 200 as an example, which refers to but is not limited to the processor core, when the power metering circuit 100 does not include the second computing module 200, the power metering circuit 100 may refer to the circuit integrated in the analog front end (AFE); while when the power metering circuit 100 includes the second computing module 200, the power metering circuit 100 may refer to the circuit in the AFE+SOC chip, which combines the analog front end chip and the system-on-a-chip.
[0087] In some embodiments of this application, the timing module 10 is further configured to output a second signal every N measurement cycles, the second signal being used to wake up the second calculation module 200 so that the second calculation module 200 reads the first total power data and determines the second total power data.
[0088] For example, the timing module 10 may include a first counter and a second counter. The first counter counts the clock signal. The first counter increments by 1 for each high level of the clock signal. When the first counter reaches a set value, it outputs a first signal to wake up the analog-to-digital conversion module 20. The second counter counts the first signal. The second counter increments by 1 for each output of the first signal. When the second counter reaches N, it outputs a second signal to wake up the second calculation module 200, so that the second calculation module 200 can read the first total power data and determine the second total power data.
[0089] It is understood that the implementation of the timing module 10 outputting the first signal and the second signal is not limited to this. For example, both the first counter and the second counter can count the clock signal, but the set value corresponding to the second signal output by the second counter is N times the set value corresponding to the first signal output by the first counter.
[0090] In some embodiments of this application, the analog-to-digital conversion module 20 measures voltage data and current data in the first time period of each measurement cycle; the first calculation module 30 can calculate the cycle power data based on the voltage data and current data in the second time period of each measurement cycle; wherein, the second time period is after the first time period.
[0091] For example, see Figure 5 , Figure 5This illustration shows another schematic diagram of multiple measurement cycles for power metering in an embodiment of this application. The measurement cycle is T0. The analog-to-digital conversion module 20 measures the voltage and current data of the battery module during the t01 time period of each measurement cycle. The first calculation module 30 calculates the cycle power data and the first total power data corresponding to the measurement cycle during the t02 time period of each measurement cycle. Since the t02 time period is after the t01 time period in each measurement cycle, the first calculation module 30 can use the voltage and current data of the current measurement cycle to calculate the cycle power data and the first total power data corresponding to the current measurement cycle in each measurement cycle. This ensures the real-time performance of the cycle power data and the first total power data and avoids battery power metering lag.
[0092] In some embodiments of this application, see Figure 6 , Figure 6 Another schematic diagram of the power metering circuit 100 in this application embodiment is shown, wherein the analog-to-digital conversion module 20 includes a first analog-to-digital converter 21 and a second analog-to-digital converter 22; the first analog-to-digital converter 21 is used to measure the voltage data of the battery module, and the second analog-to-digital converter 22 is used to measure the current data of the battery module.
[0093] It should be noted that since the first analog-to-digital converter 21 and the second analog-to-digital converter 22 measure the voltage and current data of the battery module respectively, the first analog-to-digital converter 21 and the second analog-to-digital converter 22 can start working in parallel in each measurement cycle. That is, the first analog-to-digital converter 21 and the second analog-to-digital converter 22 start measuring the voltage and current data of the battery module simultaneously in response to the first signal, so as to shorten the time for the analog-to-digital conversion module 20 to measure the voltage and current data of the battery module, thereby helping to shorten the measurement cycle and improve the battery power measurement frequency.
[0094] For example, see Figure 7 , Figure 7 This illustration shows another schematic diagram of multiple measurement cycles for power metering in an embodiment of this application. The measurement cycle is T0. The first analog-to-digital converter 21 measures the voltage data of the battery module during the t1 time period of each measurement cycle. The second analog-to-digital converter 22 measures the current data of the battery module during the t2 time period of each measurement cycle. The first calculation module 30 calculates the cycle power data and the first total power data corresponding to the measurement cycle during the t02 time period of each measurement cycle. The first analog-to-digital converter 21 and the second analog-to-digital converter 22 simultaneously start measuring the voltage and current data of the battery module in each measurement cycle.
[0095] In some embodiments of this application, the number of bits of the first analog-to-digital converter 21 is less than the number of bits of the second analog-to-digital converter 22.
[0096] It should be noted that the voltage data of the battery module is usually obtained by measuring the voltage between the positive and negative terminals of the battery module, while the current data of the battery module is usually obtained by measuring the voltage across a standard resistor connected in series in the battery module circuit and calculating the current data using the current calculation formula I = V / R. To reduce the power consumption of measuring current data, the resistance value of the standard resistor connected in series in the battery module circuit is usually small. Therefore, the voltage value measured by the first analog-to-digital converter 21 is usually in the V level, while the voltage value measured by the second analog-to-digital converter 22 is usually in the mV level. Since the number of bits of the first analog-to-digital converter 21 is smaller than that of the second analog-to-digital converter 22, and the higher the number of bits of the analog-to-digital converter, the higher the measurement accuracy, the second analog-to-digital converter 22 can measure higher precision current data, while the first analog-to-digital converter 21 with fewer bits can ensure the current measurement accuracy while reducing measurement power consumption, thereby improving the power metering accuracy of the battery module.
[0097] In some embodiments of this application, see Figure 8 , Figure 8 The diagram shows a schematic of a first calculation module 30 in an embodiment of this application. The first calculation module 30 includes a first multiplication unit 31 and a first integration unit 32. The first multiplication unit 31 is used to calculate the cycle power data based on voltage data and current data in each measurement cycle. The first integration unit 32 is used to determine the first total power data corresponding to the current measurement cycle based on the cycle power data and historical power data in each measurement cycle.
[0098] For example, the first multiplication unit 31 may include a multiplier. After the first analog-to-digital converter 21 outputs voltage and current data in each measurement cycle, the multiplier can perform a multiplication operation on the binary voltage and current data, thereby calculating the cycle power data based on the voltage and current data in each measurement cycle. The first integration unit 32 may include an adder. The first total power data obtained in each measurement cycle will be updated in the storage circuit (e.g., register circuit). In each measurement cycle, the adder can sum the cycle power data output by the first multiplier with the first total power data (i.e., historical power data) stored in the storage circuit to obtain the first total power data corresponding to the current measurement cycle, and update the first total power data in the storage circuit to wait for the second calculation module 200 to read the first total power data in the storage circuit.
[0099] It is understandable that after the second calculation module 200 reads the first total power data from the storage circuit each time, the storage circuit will be cleared so that the first calculation module 30 can calculate and store the first total power data corresponding to the next N measurement cycles.
[0100] In some embodiments of this application, see Figure 9, Figure 9 Another schematic diagram of the first calculation module 30 in an embodiment of this application is shown, wherein the first calculation module 30 further includes a first calibration unit 33 and a second calibration unit 34; the first calibration unit 33 is used to calibrate voltage data to obtain voltage calibration data, and the second calibration unit 34 is used to calibrate current data to obtain current calibration data; the first multiplication unit 31 is used to calculate cycle power data based on the voltage calibration data and the current calibration data.
[0101] It should be noted that the voltage and current data output by the first analog-to-digital converter 21 and the second analog-to-digital converter 22 usually have errors relative to the actual voltage and current of the battery module, such as gain error or offset error of the analog-to-digital converter or signal amplifier. Since the first calibration unit 33 can calibrate the voltage data and the second calibration unit 34 can calibrate the current data, the first multiplication unit 31 can calculate the cycle power data based on the calibrated voltage calibration data and current calibration data, which helps to improve the accuracy of the cycle power data and the first total power data.
[0102] For example, the first calibration unit 33 can calibrate voltage data according to the following formula, and the second calibration unit 34 can calibrate current data according to the following formula:
[0103] V'=V*k1+a
[0104] I'=I*k2+b
[0105] Wherein, V' is the calibrated voltage data after calibration, I' is the calibrated voltage data after calibration, k1 and a are parameters configured in the corresponding parameter register of the first calibration unit 33, and k2 and b are parameters configured in the corresponding parameter register of the second calibration unit 34.
[0106] It is understandable that the above formula is an example of the calibration process for voltage and current data using first-order error as an example. In reality, it is not limited to this. For example, voltage and current data may also have higher-order errors, and the above formula may have higher-order calibration parameters corresponding to higher-order errors.
[0107] In some embodiments of this application, see Figure 10 , Figure 10 Another schematic diagram of the first calculation module 30 in an embodiment of this application is shown, wherein the first calculation module 30 further includes a first code value conversion unit 35 and a second code value conversion unit 36; the first code value conversion unit 35 is used to convert voltage data to obtain voltage conversion data, and the second code value conversion unit 36 is used to convert current data to obtain current conversion data; the first calibration unit 33 is used to calibrate the voltage conversion data, and the second calibration unit 34 is used to calibrate the current conversion data.
[0108] It should be noted that in some possible embodiments, the code value corresponding to the binary voltage data output by the first analog-to-digital converter 21 is not proportional to the actual voltage of the battery module, and the code value corresponding to the binary current data output by the second analog-to-digital converter 22 is also not proportional to the actual current of the battery module. Since the first code value conversion unit 35 can convert voltage data and obtain voltage conversion data, the converted voltage conversion data can be proportional to the actual voltage, and the second code value conversion unit 36 can convert current data and obtain current conversion data, the converted current conversion data can be proportional to the actual current. Therefore, the phenomenon of incorrect battery power measurement can be avoided.
[0109] For example, taking the first analog-to-digital converter 21 and the second analog-to-digital converter 22 as SD ADCs, the first code value conversion unit 35 and the second code value conversion unit 36 can convert voltage data and current data according to the following formula:
[0110] V”=((V / (N1*(N1-1))-0.5)*2*Vref1) / PGA1
[0111] I”=((I / (N2*(N2-1))-0.5)*2*Vref2) / PGA2
[0112] Wherein, V” represents voltage conversion data, I” represents current conversion data, N1 represents the number of samples of the first analog-to-digital converter 21, Vref1 represents the reference voltage of the first analog-to-digital converter 21, PGA1 represents the amplification factor of the pre-amplifier circuit of the first analog-to-digital converter 21, N2 represents the number of samples of the second analog-to-digital converter 22, Vref2 represents the reference voltage of the second analog-to-digital converter 22, and PGA2 represents the amplification factor of the pre-amplifier circuit of the second analog-to-digital converter 22.
[0113] It is worth noting that the above description of the power metering circuit 100 is intended to clearly illustrate the implementation and verification process of this application. Those skilled in the art can make equivalent modifications under the guidance of this application. For example, the calibration process of the voltage data and current data by the first calibration unit 33 and the second calibration unit 34 can also be replaced by the calibration of the first total power data by the second calculation module 200. As another example, the conversion process of the voltage data and current data by the first code value conversion unit 35 and the second code value conversion unit 36 can also be replaced by the conversion of the first total power data by the second calculation module 200.
[0114] To better implement the power metering circuit 100 in the embodiments of this application, this application also provides a power metering method based on the power metering circuit 100, see reference. Figure 11 , Figure 11 This paper illustrates a flowchart of a power metering method according to an embodiment of the present application, wherein the power metering method includes:
[0115] Step S1101: Measure the voltage and current data of the battery module in each measurement cycle;
[0116] Step 1102: Calculate cycle power data based on voltage data and current data in each measurement cycle, and determine the first total power data corresponding to the current measurement cycle based on cycle power data and historical power data in each measurement cycle.
[0117] Step 1103: Determine the second total power data based on the first total power data every N measurement cycles, where N is an integer greater than or equal to 2;
[0118] The first total power consumption data is determined based on the first calculation module 30, and the second total power consumption data is determined based on the second calculation module 200. The power consumption per unit time of the first calculation module 30 is less than that of the second calculation module 200.
[0119] In this embodiment, the power consumption per unit time of the first computing module 30 is less than that of the second computing module 200. For example, the first computing module 30 may include digital logic operation circuits such as multipliers and adders, and the second computing module 200 may refer to a processor core, MCU chip, or SoC chip with computing processing capabilities. Since the first computing module 30 normally measures the power data of each measurement cycle without losing data, and the power consumption per unit time of the first computing module 30 is less than that of the second computing module 200, this application can not only ensure the power measurement accuracy of the battery module, but also reduce the power measurement power consumption of the battery module.
[0120] This application embodiment also provides a chip, which includes the aforementioned power metering circuit 100 and the second computing module 200. The chip (Integrated Circuit, IC) can be, but is not limited to, a system-on-chip (SoC), a system-in-package (SIP), etc.
[0121] In this embodiment, the second calculation module 200 is used to determine the second total power data based on the first total power data determined by the first calculation module 30 in every N measurement cycles.
[0122] For example, in a specific implementation, the power metering circuit 100 may refer to a circuit integrated in an analog front end (AFE) chip, and the second computing module 200 may specifically be a microcontroller unit (MCU). Accordingly, the chip provided in this embodiment may specifically be a SoC chip integrating an AFE including the power metering circuit 100 and an MCU.
[0123] It is readily understood that since the chip of this application has the power metering circuit 100 described in the above embodiments, it has all the beneficial effects of the power metering circuit 100 in the above embodiments, which will not be repeated here.
[0124] This application also provides a battery management system, which includes the chip described above. The battery management system (BMS) can be, but is not limited to, a distributed battery management system, a centralized battery management system, or a hybrid battery management system. Since the chip of the battery management system in this application has the power metering circuit 100 described in the above embodiments, it possesses all the beneficial effects of the power metering circuit 100 in the above embodiments, which will not be repeated here.
[0125] This application also provides an electronic device, which includes a device body and a chip or battery management system, as described above, disposed within the device body. The electronic device may be, but is not limited to, mobile devices, smart wearable devices, electric vehicles, energy storage systems, drones, power tools, robots, smart home devices, etc. Mobile devices may include, but are not limited to, mobile phones, tablets, laptops, portable Wi-Fi devices, power banks, etc.; smart wearable devices may include, but are not limited to, smartwatches, smart bracelets, neck massagers, etc.; electric vehicles may include, but are not limited to, battery electric vehicles (BEVs), hybrid electric vehicles (HEVs), plug-in hybrid electric vehicles (PHEVs), range-extended electric vehicles (REEVs), or fuel cell electric vehicles (FCEVs); smart home devices may include, but are not limited to, smart robot vacuums, smart floor scrubbers, smart window cleaning robots, etc.
[0126] The above are merely preferred embodiments of this application and are not intended to limit this application in any way. Although this application has disclosed preferred embodiments as above, it is not intended to limit this application. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the technical solution of this application. Any simple modifications, equivalent changes and alterations made to the above embodiments based on the technical essence of this application without departing from the scope of the technical solution of this application shall still fall within the scope of the technical solution of this application.
Claims
1. A power metering circuit, characterized in that, The power metering circuit is used to measure the power of the battery module, and includes: A timing module, which outputs a first signal in each measurement cycle; An analog-to-digital converter module is used to measure the voltage and current data of the battery module in each measurement cycle in response to the first signal. The first calculation module is used to calculate cycle power data based on the voltage data and current data in each measurement cycle, and to determine the first total power data corresponding to the current measurement cycle based on the cycle power data and historical power data. Wherein, the first total power data determined by the first calculation module in every N measurement cycles is configured to be handed over to the second calculation module to calculate and determine the second total power data, and the power consumption per unit time of the first calculation module is less than the power consumption per unit time of the second calculation module, where N is an integer greater than or equal to 2.
2. The power metering circuit as described in claim 1, characterized in that, The timing module is also used to output a second signal every N measurement cycles; The second signal is used to wake up the second calculation module so that the second calculation module reads the first total power data and determines the second total power data.
3. The power metering circuit as described in claim 1, characterized in that, The analog-to-digital conversion module measures the voltage data and the current data in the first time period of each measurement cycle; The first calculation module calculates the periodic power data based on the voltage data and current data in the second time period of each measurement cycle; The second time period is after the first time period.
4. The power metering circuit as described in claim 1, characterized in that, The analog-to-digital conversion module includes a first analog-to-digital converter and a second analog-to-digital converter; The first analog-to-digital converter is used to measure the voltage data of the battery module, and the second analog-to-digital converter is used to measure the current data of the battery module; The first analog-to-digital converter and the second analog-to-digital converter operate in parallel during each measurement cycle.
5. The power metering circuit as described in claim 4, characterized in that, The number of bits in the first analog-to-digital converter is less than the number of bits in the second analog-to-digital converter.
6. The power metering circuit as described in claim 1, characterized in that, The first calculation module includes a first multiplication unit and a first integration unit; The first multiplication unit is used to calculate cycle power data based on the voltage data and the current data in each measurement cycle; The first integration unit is used to determine, in each measurement cycle, a first total power data corresponding to the current measurement cycle based on the cycle power data and historical power data.
7. The power metering circuit as described in claim 6, characterized in that, The first calculation module further includes a first calibration unit and a second calibration unit; The first calibration unit is used to calibrate the voltage data to obtain voltage calibration data, and the second calibration unit is used to calibrate the current data to obtain current calibration data; The first multiplication unit is used to calculate the cycle power data based on the voltage calibration data and the current calibration data.
8. The power metering circuit as described in claim 6, characterized in that, The first calculation module further includes a first code value conversion unit and a second code value conversion unit; The first code conversion unit is used to convert the voltage data to obtain voltage conversion data, and the second code conversion unit is used to convert the current data to obtain current conversion data; The first calibration unit is used to calibrate the voltage conversion data, and the second calibration unit is used to calibrate the current conversion data.
9. A method for measuring electricity, characterized in that, include: The voltage and current data of the battery module are measured in each measurement cycle; In each measurement cycle, cycle power data is calculated based on the voltage data and current data, and in each measurement cycle, a first total power data corresponding to the current measurement cycle is determined based on the cycle power data and historical power data. In every N measurement cycles, a second total power data is determined based on the first total power data, where N is an integer greater than or equal to 2; The first total power consumption data is determined based on the first calculation module, the second total power consumption data is determined based on the second calculation module, and the power consumption per unit time of the first calculation module is less than the power consumption per unit time of the second calculation module.
10. A chip, characterized in that, Includes the power metering circuit and the second calculation module as described in any one of claims 1 to 8; The second calculation module is used to determine the second total power data based on the first total power data determined by the first calculation module in every N measurement cycles.
11. A battery management system, characterized in that, Includes the chip as described in claim 10.
12. An electronic device, characterized in that, This includes the chip as described in claim 10 or the battery management system as described in claim 11.