Electricity metering circuit and device

By using the current integration module to calculate the power in the battery capacity metering, the problem of insufficient power metering accuracy in the prior art is solved, and higher metering accuracy is achieved.

CN119758133APending Publication Date: 2025-04-04TWS TECH GUANGZHOU LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411808671.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

The prior art has the problem of insufficient accuracy in battery capacity measurement, especially under the influence of sampling frequency and discrete sampling error, and it is difficult to accurately measure battery capacity.

Method used

The current integration module is used to integrate the current of the target circuit to be measured within the sampling interval, calculate the power, and algebraically calculate the attribute value of the measured voltage and current integration module to obtain the power.

Benefits of technology

The accuracy of the measurement results of the target circuit to be measured is improved, and the impact of sampling frequency and discrete sampling error is reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119758133A_ABST
    Figure CN119758133A_ABST
Patent Text Reader

Abstract

The present application relates to the field of electronic circuits, and discloses an electric quantity metering circuit and device, wherein the circuit includes: a current integration module, which is suitable for receiving the measured current obtained by coupling and converting the target current of the target measured circuit within the sampling interval, and integrating the measured current to determine the measured voltage corresponding to the current integration module at the end of the sampling interval; the electric quantity of the target measured circuit within the sampling interval is calculated by measuring the voltage and the property value corresponding to the current integration module. Finally, from a mathematical level, based on the derivation relationship between the charge amount, the integral element property in the integration module and the voltage, algebraic calculations are performed using the property values ​​corresponding to the measured voltage and the current integration module, and the electric quantity of the target measured circuit within the continuous sampling process can be obtained. And because the method for calculating the electric quantity of the metering circuit is not affected by the sampling frequency and discrete sampling errors, the accuracy of the electric quantity metering results is significantly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of electronic circuits, and in particular to an electric quantity metering circuit and device. Background Art

[0002] As a key physical indicator, power consumption is essential to ensure the normal operation of equipment and optimize energy utilization. Therefore, in the field of power metering, in order to monitor and improve the performance of various electronic devices or energy systems, it is necessary to accurately record and manage the power in these systems. Taking batteries as an example, since battery capacity is a physical indicator that cannot be directly measured, the battery industry often uses the integral of charge and discharge current and time to indirectly measure power consumption. However, this method still has its limitations, and a method that can more accurately measure battery power is needed. Summary of the invention

[0003] The present application aims to solve at least one of the technical problems in the related art to a certain extent. To this end, the present application proposes an electric quantity metering circuit and device. The main technical solutions adopted by the present application include:

[0004] In a first aspect, an embodiment of the present application provides an electric power measurement circuit, the electric power measurement circuit comprising:

[0005] The current integration module is suitable for receiving the measured current obtained by coupling and converting the target current of the target measured circuit within the sampling interval, and integrating the measured current to determine the measurement voltage corresponding to the current integration module at the end time of the sampling interval; the electric quantity of the target measured circuit within the sampling interval is calculated by measuring the voltage and the attribute value corresponding to the current integration module.

[0006] In one embodiment, the current integration module includes a first current integration unit and a second current integration unit; the first current integration unit is suitable for receiving a first current obtained by coupling and converting the forward current of the target measured circuit, and integrating the first current to determine a first voltage of the first current integration unit at the end of the sampling interval; the second current integration unit is suitable for receiving a second current obtained by coupling and converting the negative current of the target measured circuit, and integrating the second current to determine a second voltage of the second current integration unit at the end of the sampling interval; the electric quantity of the target measured circuit in the sampling interval is obtained by algebraically calculating the first voltage, the second voltage, the first attribute value corresponding to the first current integration unit and the second attribute value corresponding to the second current integration unit.

[0007] In one embodiment, the first current integration unit and the second current integration unit respectively use capacitors as integration elements.

[0008] In one embodiment, the sampling interval is recorded as [t1, t2], and the power Q of the target measured circuit in the sampling interval is calculated by the following formula:

[0009] Q=Q1-Q2

[0010] Wherein, Q1=K1×f1(t)+a1, Q2=K2×f2(t)+a2, Q1 represents the positive amount of electricity contributed by the positive current of the target measured circuit in the sampling interval, Q2 represents the negative amount of electricity contributed by the negative current of the target measured circuit in the sampling interval, K1 represents the proportional adjustment parameter for compensating the coupling error when the positive current of the target measured circuit is coupled and converted to obtain the first current, K2 represents the proportional adjustment parameter for compensating the coupling error when the negative current of the target measured circuit is coupled and converted to obtain the second current, a1 represents the incremental correction parameter for compensating the sampling error when determining the first voltage, a2 represents the incremental correction parameter for compensating the sampling error when determining the second voltage, f1(t) =C1×(U1(t2)-u1(t1)), f2(t)=C2×(U2(t2)-u2(t1)), f1(t) represents the first electrical quantity obtained by integrating the first current by the first current integration unit within the sampling interval, f2(t) represents the second electrical quantity obtained by integrating the second current by the second current integration unit within the sampling interval, C1 represents the capacitance value of the capacitor in the first current integration unit, C2 represents the capacitance value of the capacitor in the second current integration unit, U1(t2) represents the first voltage, U2(t2) represents the second voltage, u1(t1) represents the initial voltage of the capacitor in the first current integration unit, and u2(t1) represents the initial voltage of the capacitor in the second current integration unit.

[0011] In one embodiment, the first current integration unit includes: an input end of the first current integration unit, suitable for receiving the first current; a first capacitor, one end of the first capacitor is connected to the input end of the first current integration unit and the output end of the first current integration unit, and the other end of the first capacitor is grounded; the output end of the first current integration unit is suitable for connecting to a voltage sampling module to determine the first voltage.

[0012] In one embodiment, the first current integration unit also includes: a first switch element, a first end of the first switch element is connected to one end of the first capacitor, and a second end of the first switch element is connected to an input end of the first current integration unit; a second capacitor, one end of the second capacitor is connected to a third end of the first switch element, and the other end of the second capacitor is grounded; a second switch element is connected in parallel with the first capacitor; a third switch element is connected in parallel with the second capacitor; and a fourth switch element, a first end of the fourth switch element is connected to one end of the first capacitor, a second end of the fourth switch element is connected to the output end of the first current integration unit, and a third end of the fourth switch element is connected to one end of the second capacitor.

[0013] In one embodiment, the first current integration unit further includes a third capacitor; one end of the third capacitor is connected to the input end of the first current integration unit, and the other end of the third capacitor is grounded.

[0014] In one embodiment, the first current integration unit and the second current integration unit have the same circuit structure.

[0015] In one of the embodiments, the metering circuit further includes a coupling module; the coupling module is adapted to map the target current of the target measured loop to the measured current of the current integration module within the sampling interval.

[0016] In a second aspect, an embodiment of the present application provides an electric power metering device, wherein a control method of the electric power metering device includes the content of any of the above-mentioned electric power metering circuits.

[0017] In the above embodiment, the measured current obtained by coupling conversion of the target current of the target measured circuit is integrated within the sampling interval, and the curve coverage area enclosed by the current-time curve and the coordinate axis within the sampling interval is determined from a mathematical perspective. At the same time, based on the derived relationship between the charge amount, the integral element properties in the integral module and the voltage, the property values ​​corresponding to the measured voltage and current integral modules are used to perform algebraic calculations to obtain the electric quantity of the target measured circuit within the sampling interval. At this point, since the method for calculating the electric quantity of the metering circuit is not affected by the sampling frequency and discrete sampling errors, the accuracy of the electric quantity metering results of the target measured circuit is significantly improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the specific implementation methods of the present application or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0019] Figure 1a A current-time curve and a discrete sampling schematic diagram provided in the related art;

[0020] Figure 1b A current-time curve and a continuous sampling schematic diagram provided according to an embodiment of the present application;

[0021] Figure 1c A structural block diagram of an electric power metering circuit provided according to an embodiment of the present application;

[0022] Figure 2 A structural block diagram of an electric power metering circuit provided according to another embodiment of the present application;

[0023] Figure 3 A structural block diagram of a current integration module provided according to an embodiment of the present application;

[0024] Figure 4 A circuit schematic diagram of a current integration module provided according to an embodiment of the present application;

[0025] Figure 5 A circuit schematic diagram of a current integration module provided according to another embodiment of the present application;

[0026] Figure 6 A circuit schematic diagram of a current integration module provided according to another embodiment of the present application;

[0027] Figure 7 The present invention is a structural block diagram of an electric power metering circuit provided according to another embodiment of the present application. DETAILED DESCRIPTION

[0028] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are 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 those skilled in the art without creative work are within the scope of protection of the present application.

[0029] Electricity is a core parameter for measuring the performance of electronic devices and energy systems. It plays a decisive role in ensuring stable operation of equipment and improving energy efficiency. In the professional field of electricity metering, accurately recording and controlling electricity is crucial to improving the performance of various electronic devices and energy systems. Taking batteries as an example, since the capacity of batteries cannot be measured directly, we usually use the method of current and time integration to indirectly evaluate the electricity. In the battery management system, in order to monitor the battery status and optimize its performance, the battery power must be accurately tracked and controlled. The unit of measurement for electricity is usually "coulomb", which is "ampere-second", while in the battery industry, "ampere-hour" or "ampere-hour" for short is more commonly used.

[0030] However, the battery capacity is not a physical quantity that can be measured directly. It needs to be calculated by integrating the battery charging and discharging process and time. Therefore, as a device for measuring the amount of electricity, the fuel gauge calculates the amount of electricity by accumulating the product of the measured current value and the current duration. This method is called the ampere-hour integration method. Its calculation expression is shown as follows:

[0031]

[0032] Where C is the electric quantity, n represents the number of discrete measurement points in a measurement period, I is the instantaneous current value of the measurement point, and t is the time between two adjacent discrete measurement points.

[0033] Finally, these discrete measurement points are multiplied by time and then added up to obtain the total power consumption during the entire measurement period.

[0034] like Figure 1a As shown, the horizontal axis in the figure is the current A, the vertical axis is the time t, each vertical line in the figure is the measurement time (i.e. the sampling time), and the vertical axis value of the corresponding curve point is the current value measured at this moment. The time between the two vertical lines is the timing time, and the area of ​​the rectangular frame formed between the vertical lines is the electrical quantity measured at two adjacent measurement time points (i.e. the sampling interval). The area covered by the measured curve composed of multiple such rectangles can be regarded as the measured value of the target measured circuit electrical quantity. From the mathematical basis, it can be obtained that when the interval between the vertical lines is small enough, that is, when the differential method approaches 0, the area of ​​the rectangle can be infinitely close to the area covered by the actual curve.

[0035] In mathematical theory, the interval between sampling moments can be infinitely close to 0, but in actual engineering applications, the interval between sampling moments cannot be close to 0, so in related technologies, 2 times the curve frequency is often used as the sampling frequency for discrete sampling. Figure 1a The current-integral curve, in which the rectangular area and the actual curve area must have corners that cannot completely overlap, and these areas that cannot overlap are a factor that causes the error in the measurement of electricity. Secondly, the discrete sampling moment of the horizontal axis sampling, that is, the position of the vertical line, is very dependent on the accuracy of the sampling moment. If there is a deviation between the time used to calculate the electricity and the sampling moment of the actual discrete sampling, for example, the time used to calculate the electricity is 1ms but the sampling moment of the actual discrete sampling is 1.01ms, then after multiplication and accumulation, there will be overlaps or gaps between the corresponding calculated rectangular areas. This phenomenon is the second error factor that causes the error in the measurement of electricity.

[0036] In addition, from its measurement principle, it can be seen that this multiplication and accumulation method of electricity measurement has high requirements for sampling frequency. In engineering applications, the higher the sampling frequency, the higher the device cost and the greater the power consumption. At the same time, the accuracy requirements of the timing device for the sampling moment are also very high. And because this time error varies randomly, it cannot be simply corrected by compensation.

[0037] However, it is understandable that Figure 1bAs shown in the figure, the horizontal axis is also the current A, the vertical axis is also the time t, and each vertical line in the figure is the measurement moment. From the characteristics of the curve, it can be known that if the power value within a certain period of time needs to be calculated, that is, Figure 1b The area covered by the current-time curve shown in , no matter when the measurement is made on the time axis of the horizontal axis, that is, where the sampling time is, as long as the curve area in each sampling interval can be accurately calculated, the curve area in each sampling interval is finally accumulated and added up to get the accurate area covered by the current-time curve. In other words, if the area of ​​the curve is calculated directly, even if the sampling time is inaccurate, it will not affect the final calculation result of the curve area, that is, it is no longer dependent on whether the sampling time is accurate.

[0038] From a mathematical point of view, taking the leftmost time interval as an example, if you need to calculate Figure 1b The area covered by the current-time curve shown in , the ordinate axis (i.e., the moment when time is 0) can be used as the starting moment, and the first vertical line adjacent to it can be used as the ending moment. In this time interval, the irregular shape area formed by the current-time curve, the horizontal and vertical axes and the first vertical line can be directly obtained by calculating the definite integral value of the current-time curve in this time interval. In essence, it is from each vertical line (starting moment) to the next vertical line (ending moment) to form a time interval, i.e., the sampling interval. The curve area in this interval is the definite integral value of the curve. Therefore, we only need to obtain the definite integral value to further obtain the electric quantity, thereby avoiding the time error. And since the calculation of the definite integral value of the reading of each time interval is completed, the end time of this interval can be used as the starting time of the next interval, then it will no longer be important whether each sampling moment is equally divided or whether there is a deviation before and after the sampling moment. In other words, the area of ​​the vertical bar area is measured each time, instead of calculating the area by the product of length and width as mentioned in the related art. In the whole process, the definite integral value is obtained directly, and the time error is not accumulated in the calculation. At the same time, the area is not required to be a rectangle. Therefore, there is no error in the coverage difference of the method of measuring the quantity by multiplication after discrete sampling in the related art.

[0039] Based on this, according to an embodiment of the present application, an embodiment of a power metering circuit is provided, such as Figure 1c As shown, the electric quantity measurement circuit 100 includes a current integration module 110 .

[0040] Among them, the current integration module 110 can be a metering loop that receives a current signal input and performs an integration process on it. Specifically, the current integration module 110 can be used to receive an input electrical signal and perform an integration process on it so that the target measured circuit power can be calculated later. Exemplarily, the current integration module can be an integration circuit constructed by analog circuit elements, such as operational amplifiers, resistors or capacitors; it can also be a digital integration circuit that uses a digital signal processor (DSP), MCU or application-specific integrated circuit (ASIC) to realize current digital integration; it can also be a metering loop that includes an integrated chip that can realize the power metering function.

[0041] The target circuit under test 120 may refer to a specific part or a circuit loop in an electronic system that needs to measure the amount of electricity. For example, the target circuit under test may be a battery, and the battery charge needs to be determined by measuring the current flowing through the battery to monitor the battery charge and discharge status; the target circuit under test may also be a transmission line or distribution network in a power grid or power distribution system, and the power flow and load changes need to be reflected based on the amount of electricity in the circuit to achieve real-time monitoring.

[0042] Specifically, the current integration module 110 is suitable for receiving the measured current obtained by coupling and converting the target current of the target measured circuit 120 within the sampling interval, and integrating the measured current to determine the measurement voltage corresponding to the current integration module 110 at the end of the sampling interval, so as to calculate the total power of the target measured circuit within a specific sampling time period.

[0043] It should be understood that, since different target measured circuits may have multiple circuit states, when calculating the electric quantity of the target measured circuit, it can be coupled to map the target current of the target measured circuit to the current integration module as the input of the current integration module in the metering circuit. For example, if there is a high voltage or a high current in the target measured circuit, electrical isolation is provided through coupling processing to ensure the safe isolation between the metering circuit and the measured circuit. If there is a current flowing in both directions in the target measured circuit, the target current of the target measured circuit can also be converted into a unidirectional measured current through coupling processing, and input into the current integration module in the metering circuit for subsequent calculation.

[0044] Furthermore, after coupling processing is performed on the target measured circuit, and the target current of the target measured circuit is effectively isolated, commutated, and referenced, the target current can be proportionally mapped to the measured current to provide input for the current integration module. When the current integration module has an input signal, it can further receive the measured current obtained by coupling the target current of the target measured circuit based on the input signal, and integrate the measured current within the sampling interval through the integration element contained in the current integration module, and finally calculate the electric quantity of the target measured circuit within the sampling interval.

[0045] Specifically, the electric quantity of the target measured circuit 120 in the sampling interval is calculated by measuring the property values ​​corresponding to the voltage and current integration module 110 .

[0046] It is important to understand that when the current being measured passes through the integration element, the integration element will accumulate charge, and the voltage applied across it will change over time. This voltage change reflects the integral of the current over time, that is, the accumulation of charge on the integration element. At the end of the sampling interval, the voltage of the integration element is measured, and then the accumulated charge in the interval is calculated based on the known property value of the integration element. In other words, the charge of the corresponding target circuit under test in the sampling interval can be calculated in proportion.

[0047] For example, taking the capacitor as an integral element, when the measured current passes through the capacitor, the capacitor will accumulate charge correspondingly, so as to integrate the measured current within the sampling interval. And in this process, the voltage change across the capacitor is proportional to the integral of the measured current. Therefore, at the end of the sampling interval, by measuring the voltage of the capacitor and combining the capacitance of the capacitor, the accumulated amount of electricity within the interval can be obtained, and the amount of electricity of the target measured circuit within the sampling interval can be further derived and calculated.

[0048] In the above implementation, the measured current obtained by coupling conversion of the target current of the target measured circuit is integrated within the sampling interval, and the curve coverage area enclosed by the current-time curve and the coordinate axis within the sampling interval is determined from a mathematical perspective. At the same time, based on the derived relationship between the charge amount, the integral element properties in the integral module and the voltage, the property values ​​corresponding to the measured voltage and current integral modules are used to perform algebraic calculations to obtain the electric quantity of the target measured circuit within the sampling interval. At this point, since the method for calculating the electric quantity of the metering circuit is not affected by the sampling frequency and discrete sampling error, the accuracy of the electric quantity metering result of the target measured circuit is significantly improved.

[0049] In some embodiments, see Figure 2 , the current integration module 110 includes a first current integration unit 210 and a second current integration unit 220 .

[0050] The first current integration unit 210 and the second current integration unit 220 may also be metering loops for receiving current signal input and performing integration processing on the current signal.

[0051] Specifically, the first current integration unit 210 is adapted to receive a first current obtained by coupling and converting the forward current of the target measured loop 120 , and integrate the first current to determine a first voltage of the first current integration unit 210 at the end of the sampling interval.

[0052] The first voltage may be obtained by sampling the first current integration unit 210 based on a sampling chip or a sampling loop. For example, an ADC acquisition chip may be used to sample the integration element in the first current integration unit 210 at the end of the sampling interval to obtain the voltage value of the load at both ends of the integration element, and the voltage value may be used as the first voltage.

[0053] The second current integration unit 220 is adapted to receive a second current obtained by coupling and converting the negative current of the target measured loop 120 , and integrate the second current to determine a second voltage of the second current integration unit 220 at the end of the sampling interval.

[0054] Similarly, the second voltage can be obtained by sampling the second current integration unit 220 based on a sampling chip or a sampling loop. An ADC acquisition chip can also be used to sample the integration element in the second current integration unit 220 at the end of the sampling interval to obtain the voltage value of the load at both ends of the integration element, and the voltage value can be used as the second voltage.

[0055] The electric quantity of the target measured circuit 120 in the sampling interval is obtained by algebraically calculating the first voltage, the second voltage, the first attribute value corresponding to the first current integration unit 210 and the second attribute value corresponding to the second current integration unit 220 .

[0056] It is important to understand that in a circuit system, current is directional, that is, current can be positive (inflow) or negative (outflow). Therefore, when measuring electricity, by integrating the positive current and the negative current respectively, the actual current change in the circuit can be captured more accurately to obtain the accurate charge situation.

[0057] Therefore, based on this, the forward current coupling of the target measured circuit 120 can be mapped to the first current integration unit 210, and the negative current coupling of the target measured circuit 120 can be mapped to the second current integration unit 220. At this time, the current direction difference in the first current integration unit 210 and the second current integration unit 220 can be ignored, and they all exist as forward currents in their respective current integration units. In subsequent calculations, the sampling chip and control algorithm can be used to integrate and sample the first current integration unit 210 and the second current integration unit 220.

[0058] Furthermore, due to the coupling mapping process, the first voltage and the second voltage each represent the contribution of the positive current and the negative current to the electric quantity in the sampling interval. After obtaining the first voltage and the second voltage, the net electric quantity value of the target measured circuit in the sampling interval can be obtained by performing algebraic calculations on the two voltage values ​​and the property values ​​corresponding to the integral elements in the respective current integral units (which may be the capacitance value or other physical values ​​of the integral elements).

[0059] In the above implementation, by processing the positive current and the negative current separately, a more accurate power measurement of the target measured circuit can be provided. At the same time, after obtaining the first voltage and the second voltage, the two voltage values ​​are algebraically calculated with the property values ​​corresponding to the integral elements in the respective current integral units. This calculation method fully takes into account the directionality of the current and also ensures the accuracy of the power calculation. In addition, this design also enables the sampling chip and the control algorithm to synchronously integrate and sample the positive current and the negative current, that is, on the basis of ensuring the accuracy of the power calculation, the hardware structure and software control algorithm of the metering circuit are simplified.

[0060] In some implementations, the first current integration unit 210 and the second current integration unit 220 respectively use capacitors as integration elements.

[0061] Specifically, since it is necessary to obtain the area covered by the current-time curve within the sampling interval, that is, to obtain the definite integral value within the sampling interval, a capacitor can be used as a current integration element in the current integration unit.

[0062] It can be understood that from the definition of capacitance, the ratio of the voltage U applied across the capacitor to the charge Q stored on the capacitor is the capacitance C, that is, there is a derivable linear relationship between the voltage of the capacitor and the amount of charge it obtains. This makes the capacitor an ideal integrating element that can accurately integrate the area under the current-time curve, that is, the accumulated charge.

[0063] The specific derivation relationship can be referred to as follows:

[0064] The definition of charge is:

[0065] Q=∫Idt

[0066] Among them, Q is the charge, I is the current, and t is the time. That is, the charge Q is the integral of the current I over the time t.

[0067] The relationship between the charge across a capacitor and the capacitance and the voltage across the capacitor is:

[0068] Q=C×U

[0069] Among them, Q is the amount of charge stored on the capacitor; C is the capacitance of the capacitor; U is the voltage applied across the capacitor. That is, the voltage across the capacitor is proportional to the amount of charge.

[0070] Then the relationship between the voltage and integral across the capacitor can be derived as:

[0071]

[0072] Among them, Q is the amount of charge stored on the capacitor; C is the capacitance value of the capacitor; I is the net current flowing through the capacitor in the sampling interval [0, T]; u(0) is the voltage value across the capacitor at the beginning of the sampling interval, which can be the initial voltage value of the capacitor; U is the voltage across the capacitor at the end of the sampling interval T.

[0073] It can be seen from the formula that there is a proportional relationship between the voltage U across the capacitor and the integral (i.e., charge) of the current I flowing through the capacitor in the time interval [0, T]. Based on this, if the capacitor is selected as the current carrier, the capacitor can be used as an ideal integrating element in the sampling interval [0, T]. And since the voltage U across the capacitor and the capacitance value C are both easily obtainable and measurable values, combined with the algebraic relationship shown in the above derivation formula, the area value (i.e., the electric quantity value) covered by the time-current curve of the measured current in the sampling interval can be easily and directly determined.

[0074] In the above implementation, since the voltage across the capacitor is an easily measurable physical quantity, the integral element selects the capacitor to conveniently obtain the voltage and capacitance values, thereby quickly calculating the amount of electricity. At the same time, the capacitor responds very quickly to voltage changes, and its physical properties are relatively stable and not easily affected by environmental factors, which helps to maintain the stability and accuracy of the integration process. In addition, the charging and discharging process of the capacitor is reversible, which means that the integration process can be precisely controlled and repeated, facilitating accurate measurement of electricity.

[0075] In some implementations, the sampling interval is recorded as [t1, t2], and the power Q of the target measured circuit in the sampling interval is calculated by the following formula:

[0076] Q=Q1-Q2

[0077] Wherein, Q1=K1×f1(t)+a1, Q2=K2×f2(t)+a2, Q1 represents the positive amount of electricity contributed by the positive current of the target measured circuit in the sampling interval, Q2 represents the negative amount of electricity contributed by the negative current of the target measured circuit in the sampling interval, K1 represents the proportional adjustment parameter for compensating the coupling error when the positive current of the target measured circuit is coupled and converted to obtain the first current, K2 represents the proportional adjustment parameter for compensating the coupling error when the negative current of the target measured circuit is coupled and converted to obtain the second current, a1 represents the incremental correction parameter for compensating the sampling error when determining the first voltage, a2 represents the incremental correction parameter for compensating the sampling error when determining the second voltage, f1(t) =C1×(U1(t2)-u1(t1)), f2(t)=C2×(U2(t2)-u2(t1)), f1(t) represents the first electrical quantity obtained by integrating the first current by the first current integration unit within the sampling interval, f2(t) represents the second electrical quantity obtained by integrating the second current by the second current integration unit within the sampling interval, C1 represents the capacitance value of the capacitor in the first current integration unit, C2 represents the capacitance value of the capacitor in the second current integration unit, U1(t2) represents the first voltage, U2(t2) represents the second voltage, u1(t1) represents the initial voltage of the capacitor in the first current integration unit, and u2(t1) represents the initial voltage of the capacitor in the second current integration unit.

[0078] Specifically, first, to calculate the electric quantity Q of the target measured circuit within the sampling interval, it is necessary to first determine the sampling interval [t1, t2], and this sampling interval represents the time range for measuring the electric quantity.

[0079] Furthermore, the first current through which the forward current of the target measured circuit 120 is coupled and mapped is integrated by the first current integration unit 210. At the beginning of the sampling interval (t1), the initial voltage u1(t1) of the capacitor in the first current integration unit is sampled and recorded. At the end of the sampling interval (t2), the first voltage U1(t2) is sampled and recorded. Similarly, the second current through which the negative current of the target measured circuit 120 is coupled and mapped is integrated by the second current integration unit 220. At the beginning of the sampling interval (t1), the initial voltage u2(t1) of the capacitor in the second current integration unit is sampled and recorded. At the end of the sampling interval (t2), the second voltage U2(t2) is sampled and recorded.

[0080] After obtaining the voltages of the two integration units, the electric quantity f1(t) obtained by integrating the first current integration unit within the sampling interval is calculated based on the formula f1(t)=C1×(U1(t2)-u1(t1)), and the electric quantity f2(t) obtained by integrating the second current integration unit within the sampling interval is calculated based on the formula f2(t)=C2×(U2(t2)-u2(t1)).

[0081] It should be noted that since the measured current received by the current integration module is obtained by coupling conversion of the target current of the target measured circuit, during calculation, the electric quantity of the target measured circuit within the sampling interval can also be optimized for accuracy through the proportional coefficient K during coupling conversion and the incremental correction constant a during sampling.

[0082] Specifically, the electric quantity obtained by integration and sampling based on the current integration module can be regarded as an independent variable, and a linear calibrable equation can be established by combining the proportional coefficient K during coupling conversion and the incremental correction constant a during sampling:

[0083] Q1=K1×f(q1)+a1

[0084] Q2=K2×f(q2)+a2

[0085] Among them, Q1 represents the positive amount of electricity contributed by the positive current of the target measured circuit in the sampling interval, Q2 represents the negative amount of electricity contributed by the negative current of the target measured circuit in the sampling interval, K1 represents the proportional adjustment parameter for compensating the coupling error when the positive current of the target measured circuit is coupled and converted to obtain the first current, K2 represents the proportional adjustment parameter for compensating the coupling error when the negative current of the target measured circuit is coupled and converted to obtain the second current, a1 represents the incremental correction parameter for compensating the sampling error when determining the first voltage, and a2 represents the incremental correction parameter for compensating the sampling error when determining the second voltage. Optionally, a circuit or battery with a known amount of electricity can be used as the target measured circuit, coupled and mapped, and input into the first current integration unit and the second current integration unit for integration, sampling and calculation to obtain the total test electricity value of the target measured circuit. Based on the total test electricity value and the known electricity value of the target measured circuit, the proportional adjustment parameters K1 and K2 and the incremental correction parameters a1 and a2 are determined.

[0086] Furthermore, after obtaining the calibrated electrical quantity value, since the positive current and negative current in the target measured circuit are input into the first current integration unit 210 and the second current integration unit 220 in the direction of the positive current after coupling conversion, it is also necessary to consider the contribution of the positive current and the negative current to the total electrical quantity of the target measured circuit in the sampling interval [t1, t2], that is, it is necessary to correct the direction thereof. Specifically, since Q1 can be regarded as representing the electrical quantity value obtained by integrating the positive current, and Q2 can be regarded as representing the electrical quantity value obtained by integrating the negative current, the direction correction can be achieved by algebraically subtracting Q=Q1-Q2, and finally the total electrical quantity Q of the target measured circuit in the sampling interval [t1, t2] is obtained.

[0087] In the above implementation, through this calculation method, based on the easily available circuit parameters, the total amount of electricity in the target measured circuit within a given sampling interval can be accurately calculated. Moreover, the change in current and the duration of the process are process quantities that do not need to be concerned about in this process, that is, the integral value is directly obtained in principle, thereby avoiding the error caused by the method of first collecting and then calculating multiplication and accumulation. That is, the requirements for the sampling module are reduced, and the accuracy of the results is improved. At the same time, there is no longer an accurate response requirement for the sampling acquisition time.

[0088] In some embodiments, Figure 3 As shown, the first current integration unit 210 includes an input terminal 302 of the first current integration unit, a first capacitor 304 and an output terminal 306 of the first current integration unit.

[0089] The input terminal 302 of the first current integration unit may refer to a position within a sampling interval where the target current of the target measured circuit 120 is captured and input to obtain the measured current obtained by coupling conversion. Specifically, the input terminal 302 of the first current integration unit is suitable for receiving the first current.

[0090] The first capacitor 304 may refer to an integration element used as a current carrier for current integration processing. Specifically, one end of the first capacitor 304 is connected to the input end 302 of the first current integration unit 210 and the output end 306 of the first current integration unit 210, and the other end of the first capacitor 304 is grounded. In the sampling interval, the first current flows through the first capacitor 304, causing the first capacitor 304 to gradually accumulate charge, thereby achieving the purpose of integrating the first current.

[0091] It should be understood that the physical structure and material properties of the capacitor determine that when it is working, the voltage applied across the capacitor will gradually increase over time. However, as the capacitor continues to charge, the current on it will gradually decrease over time, and the charge increment will also decrease accordingly, so that the voltage increment will become less and less obvious, resulting in the sampled voltage difference being difficult to identify, that is, sampling in the interval where the voltage curve becomes flat will lead to inaccurate final power measurement. When the voltage curve across the capacitor is in a steeper area, it can be regarded as the capacitor being in an efficient working range, and the changing trend of the voltage across the capacitor can reflect the change in the amount of charge in the capacitor to the greatest extent. Therefore, for the sake of voltage sampling accuracy, when sampling, the working section where the voltage applied across the capacitor has a significant change when charging can be selected as the sampling interval. Optionally, a discharge switch connected in parallel to both ends of the first capacitor 304 may be provided. The discharge switch may be a single-pole single-throw switch, which is used to set a reasonable working point for the first capacitor 304. After sampling the voltage of the first capacitor 304, the switch is closed and connected, and the two ends of the first capacitor 304 are short-circuited to the ground, and the circuit state is reset so that the first capacitor 304 can work back and forth within the efficient working range. Furthermore, the discharge switch also provides the possibility of self-calibration for the first current integration unit 210. Through the discharge switch, the first current integration unit 210 can cooperate with the control algorithm and program to perform self-calibration adjustment under different working conditions to ensure the accuracy and stability of electricity metering.

[0092] Furthermore, the output terminal 306 of the first current integration unit is suitable for connecting to the voltage sampling module 310 to determine the first voltage.

[0093] It can be understood that, within the sampling interval, the first capacitor 304 gradually accumulates the amount of charge, thereby also causing the voltage across the first capacitor 304 to gradually rise over time. That is, within this time period of the sampling interval, the voltage across the first capacitor 304 is proportional to the amount of charge stored in the capacitor and increases with time, that is, the change process of the voltage across the first capacitor 304 over time can reflect the integration of the first current flowing through the first capacitor 304 within the sampling interval. Further, the output end 306 of the first current integration unit can output the voltage change on the first capacitor 304 to the voltage sampling module 310. In other words, the voltage sampling module 310 can be used to sample the voltage across the first capacitor 304 at the beginning and end of the sampling interval, and the initial voltage at the beginning and the first voltage at the end can be obtained. Finally, based on the initial voltage, the first voltage, and the capacitance value of the first capacitor 304, the electric quantity value contributed by the first current within the sampling interval can be calculated, and then after proportional calculation and compensation of the coupling error, the electric quantity value of the target current of the target measured circuit 120 within the sampling interval can be calculated.

[0094] In the above implementation, the first current obtained by coupling conversion of the forward target current of the target measured circuit is first received through the input end of the first current integration unit. After input into the first current integration unit, the first capacitor integrates the first current, and finally passes through the output end of the first current integration unit and collects the first voltage through the voltage sampling module. Through the above circuit structure, the first current integration unit can accurately measure and integrate the forward current, and collect its voltage signal, further providing basic data for power calculation.

[0095] In some embodiments, see Figure 4 The first current integration unit 210 further includes a first switch element 402 , a second capacitor 404 , a second switch element 406 , a third switch element 408 and a fourth switch element 410 .

[0096] It is understandable that if the time span of the sampling interval is long, due to the limitation of the capacitor voltage, if the capacitor is continuously charged, the current flowing through the capacitor will gradually decrease over time, and its charge increment will also decrease, resulting in the voltage increment at both ends of the capacitor becoming less and less obvious, and the voltage curve is no longer a steep upward trend, but becomes gentle. In this case, the slight change in the voltage at both ends of the capacitor is difficult to capture and identify, that is, the voltage difference may be difficult to identify, resulting in errors in the final calculated value of electricity. Based on this, the switch can be set to discharge the capacitor after it is charged to a certain extent, so that the capacitor can be controlled to work back and forth in the efficient working range where the voltage change is more obvious, that is, the voltage curve is steeper. However, when the capacitor is discharged, sampling needs to continue at the same time to ensure the continuity of the metering process. Therefore, further, a ping-pong switching method can be used. When the first capacitor 304 is in a discharging state, the first current is integrated in its efficient working range through the second capacitor 404; when the second capacitor 404 is in a discharging state, the first current is integrated in its efficient working range through the first capacitor 304, and the switching is repeated in this way to ensure that at any time in the sampling interval, there is a capacitor in the first current integration unit 210 that is in a working state in the efficient working range to integrate the first current, thereby ensuring the continuity and accuracy of the metering process.

[0097] The second capacitor 404 may also be an integrating element used as a current carrier for current integration processing. Specifically, one end of the second capacitor 404 is connected to the third end of the first switch element 402, and the other end of the second capacitor 404 is grounded.

[0098] The first switch element 402 may be a single-pole double-throw switch. Specifically, the first switch element 402, the first end of the first switch element is connected to one end of the first capacitor 304, and the second end of the first switch element 402 is connected to the input end 306 of the first current integration unit 210. The first switch element 402 may be used to receive the first current input from the input end 306 of the first current integration unit 210, and control which capacitor the first current flows into for integration processing.

[0099] The second switch element 406 can be a single-pole single-throw switch. Specifically, the second switch element 406 is connected in parallel with the first capacitor 304 and can be used to connect or disconnect the first capacitor 304 at a specific time to control the flow of current or measure. For example, if at the end of a certain sampling interval, the first voltage across the first capacitor 304 has been acquired based on the voltage sampling module 310, the second switch element 406 can be immediately closed through a control signal, thereby short-circuiting the first capacitor 304 and grounding it, so that the first capacitor 304 is discharged back to the initial state, so as to continue to integrate the first current in the next sampling interval.

[0100] Similarly, the second capacitor 404 may also be connected in parallel with a third switch element 408 for controlling the charging and discharging process of the second capacitor 404. The third switch element 408 may also be a single-pole single-throw switch, which is used to connect the circuit based on the third switch element 408 immediately after the first voltage across the second capacitor 404 is acquired based on the voltage sampling module 310 at the end of a certain sampling interval, so as to discharge the second capacitor 404 back to the initial state, so as to continue to integrate the first current in the next sampling interval.

[0101] Furthermore, a fourth switch element 410 is further provided near the output end of the first current integration unit 210. The fourth switch element 410 can also be a single-pole double-throw switch. Specifically, the first end of the fourth switch element 410 is connected to one end of the first capacitor 304, the second end of the fourth switch element 410 is connected to the output end of the first current integration unit 210, and the third end of the fourth switch element 410 is connected to one end of the second capacitor 404. The fourth switch element 410 can be used to close the switch when the first capacitor 304 is working, so as to connect the branch including the first capacitor 304, so that the voltage sampling module 310 can perform voltage acquisition processing on the first capacitor 304 at the end of the sampling interval; when the second capacitor 404 is working, the switch is closed to connect the branch including the second capacitor 404, so that the voltage sampling module 310 can perform voltage acquisition processing on the second capacitor 404 at the end of the sampling interval.

[0102] Exemplarily, when the first current integration unit 210 is not in the working state, the circuit can be initialized and prepared, and at this time, each switch element can be in the released state.

[0103] At the beginning of the first sampling interval, the first switch element 402 is controlled by a control signal to connect the branch including the first capacitor 304 , so that the external input is input into the branch via the input terminal 302 of the first current integration unit to charge the first capacitor 304 .

[0104] In this process, the fourth switch element 410 can be switched to another branch including the second capacitor 404 , and the initial voltage value of the second capacitor 404 which has not yet been operated and is in an initial state is collected while the first capacitor 304 is being charged.

[0105] Further, after the first capacitor 304 is charged, at the end of the first sampling interval, the first switch element 402 and the fourth switch element 410 are synchronously controlled to switch. Specifically, the first switch element 402 is controlled to switch and connect to the branch containing the second capacitor 404, so that the external input is input into the branch via the input terminal 302 of the first current integration unit to charge the second capacitor 404. In addition, the fourth switch element 410 is also controlled to connect to the branch containing the first capacitor 304, so that the voltage sampling module 310 can perform voltage acquisition processing on the first capacitor 304 at the end of the first sampling interval.

[0106] It is understandable that in the switching process, the time used for this process is extremely short. The time required for switching is at the uS or even nS level, while the time required for integration is at the mS level. Therefore, in terms of the ratio of the switching time to the integration time period, the time difference is on the order of 1000 times. Therefore, from an engineering perspective, the accuracy error caused by the switching time can be approximately ignored. In terms of time, the end time of the first sampling interval can be directly regarded as the start time of the second sampling interval, and the sampling corresponds to entering the next sampling interval.

[0107] In the time period of the second sampling interval, after the voltage sampling module 310 has collected the voltage value accumulated at both ends of the first capacitor 304 in the first sampling interval, the second switch element 406 can be controlled to close, so as to short-circuit and ground both ends of the first capacitor 304, so that the first capacitor 304 is discharged back to the initial state, so as to continue to integrate the first current in the next sampling interval. At this time, the second capacitor 404 is still performing charging integration.

[0108] At the end of the second sampling interval, the switching operation is also performed. The first switch element 402 is controlled to switch and connect to the branch containing the first capacitor 304, so that the external input is input into the branch via the input terminal 302 of the first current integration unit, and the first capacitor 304 is charged again. In addition, the fourth switch element 410 is also controlled to connect to the branch containing the second capacitor 404, so that the voltage sampling module 310 can perform voltage acquisition processing on the second capacitor 404 at the end of the second sampling interval. At this time, the sampling also corresponds to entering the next sampling interval.

[0109] When in the time period of the third sampling interval, after the voltage sampling module 310 collects the voltage value accumulated at both ends of the second capacitor 404 in the second sampling interval, the third switch element 408 can be controlled to connect the circuit, so that the second capacitor 404 is discharged back to the initial state, so as to continue to integrate the first current in the next sampling interval. At this time, the first capacitor 304 is still performing charging integration.

[0110] Furthermore, the above process is repeated within the entire sampling interval to implement ping-pong switching, and finally the voltage values ​​obtained in each sampling interval are integrated to calculate the total electrical quantity of the target measured circuit 120 within the total sampling interval.

[0111] It should be understood that the capacitance of the capacitor is not a fixed value that does not change, but will change due to factors such as manufacturing process, ambient temperature and use time. Therefore, after using the capacitor for a period of time, it can be calibrated to ensure that the data results of its long-term work remain accurate and reliable. Optionally, if within a certain sampling interval, the capacitor of a branch has completed the discharge work and is in an idle state, but the capacitor in another branch has not yet completed charging and is performing current integration. In this case, the capacitor in the idle state branch can be calibrated based on the control signal and the corresponding algorithm program. Similarly, the same method can be used to calibrate the capacitor of the other branch to improve the accuracy of the power value of the target measured circuit measured by the power metering circuit during long-term work.

[0112] In the above implementation, through ping-pong switching, one capacitor can be integrated while the other capacitor is in a ready or reset state, ensuring the continuity of the data stream. This continuous method of integrating and measuring current can improve the continuity, efficiency, accuracy and flexibility of the measurement, so that the target current of the target measured circuit can be accurately measured within the sampling interval. At the same time, due to ping-pong switching, the capacitor of the idle branch can be dynamically interspersed for calibration without interrupting the normal working state of the circuit to improve the accuracy of the measurement.

[0113] In some embodiments, see Figure 5 , the first current integration unit 210 also includes a third capacitor 502 .

[0114] Among them, the third capacitor 502 can also be an integral element used as a current carrier for current integration processing. One end of the third capacitor 502 is connected to the input end 302 of the first current integration unit, and the other end of the third capacitor 502 is grounded. Specifically, the third capacitor 502 can be used to supplement the integration of the input first current when the first switch element 402 and the fourth switch element 410 are switching, and temporarily store the integral power value contributed by the input signal during the time difference from the first switch element 402 being switched from disconnected to connected to different branches, to ensure that the power measurement result will not be inaccurate due to the loss of power during the switching time during the entire measurement.

[0115] In the above embodiment, during the switch switching period, the third capacitor 502 can effectively capture the change of the input signal, reduce the influence of the instantaneous current change caused by the switch switching on the measurement result, and improve the measurement accuracy.

[0116] In some embodiments, the first current integration unit 210 and the second current integration unit 220 have the same circuit structure.

[0117] For example, please refer to Figure 6 The second current integration unit 220 may include an input terminal 602 , a fourth capacitor 603 , a fifth switch element 604 , a fifth capacitor 606 , a sixth switch element 608 , a sixth capacitor 610 , a seventh switch element 612 , an eighth switch element 614 and an output terminal 616 .

[0118] Specifically, the second current integration unit 220 implements the content mentioned in the first current integration unit 210. For the specific definition of the second current integration unit 220, please refer to the definition of the first current integration unit 210 above, which will not be repeated here.

[0119] In some embodiments, see Figure 7 , the metering circuit 100 also includes a coupling module 710 .

[0120] Among them, the coupling module 710 can refer to a device or loop that transmits or converts energy from a certain circuit to other circuits. Specifically, the coupling module 710 can use a non-direct coupling method to map the target current of the target measured circuit 120 to the measured current of the current integration module 110 within the sampling interval.

[0121] Exemplarily, the coupling module 710 may include an effective coupling device, through elements such as Hall sensors or magnetic resistance. Furthermore, the coupling module 710 is installed near the current path of the target measured loop 120 to sense the magnetic field generated by the current. When the target measured loop is in a working state, current will flow through its circuit loop to generate a magnetic field around the current path. At this time, the coupling module 710 converts the magnetic field into a voltage or current signal through the coupling device therein, and the converted signal is proportional to the original current. Optionally, the converted signal obtained by the coupling conversion can also be effectively isolated, commutated, and referenced. Point setting and other processing are performed to finally achieve the mapping of the target current of the target measured loop 120 to the measured current of the current integration module 110 within the sampling interval.

[0122] It is understandable that, since different target measured circuits may have multiple circuit states, when calculating the electric quantity of the target measured circuit, coupling needs to be performed through the coupling module 710. Exemplarily, through the coupling module 710, the target current of the target measured circuit can be coupled and mapped to achieve the direction conversion. Furthermore, after coupling the target measured circuit, an operational amplifier circuit can be used to perform effective isolation, commutation, and reference point setting, and finally the branch signals of the positive and negative directions of the target current are branched into two currents respectively, and are input into the first current integration unit 210 and the second current integration unit 220 in the same direction for processing. Here, the implementation process can be represented by mathematically performing an absolute value operation on the target current:

[0123]

[0124] Wherein, i represents the target current of the target measured circuit; I represents the measured current mapped to the current integration module after coupling processing.

[0125] As shown in the formula, when the target current of the target measured circuit is a positive current, the original current direction is maintained, and it is coupled and mapped as a first current and input into the first current integration unit 210; when the target current of the target measured circuit is a negative current, it is reversely processed and coupled and mapped as a second current and input into the second current integration unit 220, that is, it is ensured that the current input into the current integration unit is in the same direction, and is a positive current, so as to facilitate integration and collection calculation. Finally, the power value of the first current integration unit obtained in the total sampling interval and the power value of the second current integration unit obtained in the total sampling interval are algebraically subtracted, that is, the net power value of the target measured circuit 120 in the total sampling interval is obtained.

[0126] It should be understood that since the measured current is obtained by coupling conversion of the target current in the target measured circuit, the final electric quantity value needs to be calculated in proportion to compensate for the coupling error. Exemplarily, a circuit or battery with a known electric quantity can be used as the target measured circuit. After using the coupling module 710, it is coupled and mapped, input to the first current integration unit and the second current integration unit for integration, sampling and calculation to obtain the total test electric quantity value of the target measured circuit. The total test electric quantity value is proportionally calculated with the known electric quantity value of the target measured circuit to determine the proportional adjustment parameter of the coupling module 710.

[0127] Furthermore, when it is necessary to calculate the power of a target measured circuit with unknown power, if the coupling module 710 is also used for coupling processing, then after the first current integration unit and the second current integration unit perform integration, sampling and calculation to obtain the total power value of the target measured circuit, the total power value can be compensated for the proportion correction in combination with the pre-calculated proportion adjustment parameters to finally obtain the total power value of the target measured circuit with unknown power.

[0128] In the above embodiment, the coupling module 710 is used to uniformly convert the positive and negative currents in the target measured loop 120 into positive currents so that the current integration module 110 can process them, thereby ensuring that the current integration module processes currents in the same direction and simplifying the subsequent integration and calculation processes. At the same time, a proportional adjustment parameter is designed to compensate for the error introduced by the coupling, thereby further improving the accuracy of the measurement results.

[0129] It should be understood that an electric power metering circuit in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions. Each module in the above-mentioned electric power metering circuit can be implemented in whole or in part by software, hardware, and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0130] This embodiment also provides an electric power metering device, which implements the content of the metering circuit mentioned in any of the above embodiments. The specific definition of the electric power metering device can refer to the definition of the electric power metering circuit above, which will not be repeated here.

[0131] The power metering circuit and device described in the above embodiments can be implemented by a computer chip or entity, or by a product with a certain function. A typical implementation device is a computer. Specifically, the computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0132] The above-mentioned method according to the embodiment of the present application can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium and downloaded through a network, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0133] The above-mentioned method according to the embodiment of the present application can be implemented in a computer program product, which includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method of any embodiment of the present application. These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including an instruction device, and the instruction device implements the function specified in one or more processes of the flowchart and / or one or more boxes of the block diagram.

[0134] These computer program instructions may also be loaded onto a computer or other programmable data processing device, so that a series of operating steps are performed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more processes of the flowchart and / or one or more blocks of the block diagram. For the convenience of description, the above device is described separately by function into various units. Of course, when implementing the present application, the functions of each unit can be implemented in the same or more software and / or hardware.

[0135] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0136] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0137] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0138] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0139] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. Since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0140] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

[0141] Although the embodiments of the present application are described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present application, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. An electric quantity measuring circuit, characterized in that: The power measurement circuit comprises: The current integration module is suitable for receiving the measured current obtained by coupling and converting the target current of the target measured circuit within the sampling interval, and integrating the measured current to determine the measurement voltage corresponding to the current integration module at the end time of the sampling interval; the electric quantity of the target measured circuit within the sampling interval is calculated by the measurement voltage and the property value corresponding to the current integration module.

2. The circuit according to claim 1, characterized in that The current integration module includes a first current integration unit and a second current integration unit; The first current integration unit is adapted to receive a first current obtained by coupling and converting the forward current of the target measured loop, and integrate the first current to determine a first voltage of the first current integration unit at the end of the sampling interval; The second current integration unit is adapted to receive a second current obtained by coupling and converting the negative current of the target measured loop, and integrate the second current to determine a second voltage of the second current integration unit at the end of the sampling interval; The electric quantity of the target measured circuit in the sampling interval is obtained by algebraically calculating the first voltage, the second voltage, the first attribute value corresponding to the first current integration unit, and the second attribute value corresponding to the second current integration unit.

3. The circuit according to claim 2, characterized in that The first current integration unit and the second current integration unit respectively use capacitors as integration elements.

4. The circuit according to claim 3, characterized in that The sampling interval is recorded as [t1, t2], and the power Q of the target measured circuit in the sampling interval is calculated by the following formula: Q=Q1-Q2 Wherein, Q1=K1×f1(t)+a1, Q2=K2×f2(t)+a2, Q1 represents the positive amount of electricity contributed by the positive current of the target measured circuit in the sampling interval, Q2 represents the negative amount of electricity contributed by the negative current of the target measured circuit in the sampling interval, K1 represents the proportional adjustment parameter for compensating the coupling error when the positive current of the target measured circuit is coupled and converted to obtain the first current, K2 represents the proportional adjustment parameter for compensating the coupling error when the negative current of the target measured circuit is coupled and converted to obtain the second current, a1 represents the incremental correction parameter for compensating the sampling error when determining the first voltage, a2 represents the incremental correction parameter for compensating the sampling error when determining the second voltage, f1(t)=C 1×(U1(t2)-u1(t1)), f2(t)=C2×(U2(t2)-u2(t1)), f1(t) represents the first electrical quantity obtained by integrating the first current by the first current integration unit in the sampling interval, f2(t) represents the second electrical quantity obtained by integrating the second current by the second current integration unit in the sampling interval, C1 represents the capacitance value of the capacitor in the first current integration unit, C2 represents the capacitance value of the capacitor in the second current integration unit, U1(t2) represents the first voltage, U2(t2) represents the second voltage, u1(t1) represents the initial voltage of the capacitor in the first current integration unit, and u2(t1) represents the initial voltage of the capacitor in the second current integration unit.

5. The circuit according to claim 3, characterized in that The first current integration unit comprises: An input terminal of the first current integration unit is adapted to receive the first current; A first capacitor, one end of the first capacitor is connected to the input end of the first current integration unit and the output end of the first current integration unit, and the other end of the first capacitor is grounded; The output end of the first current integration unit is suitable for connecting to a voltage sampling module to determine the first voltage.

6. The circuit according to claim 5, characterized in that The first current integration unit further includes: a first switch element, wherein a first end of the first switch element is connected to one end of the first capacitor, and a second end of the first switch element is connected to an input end of the first current integration unit; a second capacitor, one end of the second capacitor being connected to the third end of the first switch element, and the other end of the second capacitor being grounded; a second switch element connected in parallel with the first capacitor; a third switch element, connected in parallel with the second capacitor; A fourth switch element, wherein a first end of the fourth switch element is connected to one end of the first capacitor, a second end of the fourth switch element is connected to the output end of the first current integration unit, and a third end of the fourth switch element is connected to one end of the second capacitor.

7. The circuit according to claim 5 or 6, characterized in that The first current integration unit further includes a third capacitor; One end of the third capacitor is connected to the input end of the first current integration unit, and the other end of the third capacitor is grounded.

8. The circuit according to claim 5 or 6, characterized in that: The circuit structures of the first current integration unit and the second current integration unit are the same.

9. The circuit according to claim 1, characterized in that The power metering circuit also includes a coupling module; The coupling module is adapted to map the target current of the target measured circuit to the measured current of the current integration module within the sampling interval.

10. An electric quantity measuring device, characterized in that: The electric quantity measuring circuit comprises the electric quantity measuring circuit as claimed in any one of claims 1 to 9.