Electric energy measurement method, device, electronic equipment and medium
By connecting multiple groups of power integrators in parallel to process the instantaneous power of the grid in different ways, it solves the problem that existing electric energy measurement methods cannot meet a variety of electric energy measurement needs, and achieves a wider range of electric energy measurement capabilities.
Patent Information
- Application Number
- CN202310479753.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-27
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2043-04-27
AI Technical Summary
Existing electric energy measurement methods cannot meet different electric energy measurement needs because they rely on a single power integration method, resulting in low comprehensiveness and applicability, and cannot obtain measurement results of forward, reverse, and absolute electric energy at the same time.
The instantaneous power of the power grid is processed through power integration processing through at least two sets of parallel power integrators. Each integrator performs different integration methods and calculates its own electric energy accumulation results, thereby achieving the acquisition of multiple electric energy measurement results.
The comprehensiveness and applicability of the electric energy measurement method is improved, and it can meet different electric energy measurement needs, such as obtaining the measurement results of forward, reverse and absolute electric energy at the same time, and solving the limitations of a single integration method.
Smart Images

Figure CN116338302B
Abstract
Description
Technical Field
[0001] The present application belongs to the field of electric power technology, and in particular relates to an electric energy metering method, device, electronic equipment and medium. Background Art
[0002] In the traditional electric energy metering method, the instantaneous power of the power grid is usually obtained first, and the instantaneous power is integrated through a power integrator with a pre-set power integration method (such as absolute value integration method, algebraic sum integration method, forward integration method and reverse integration method, etc.) to obtain the electric energy accumulation result, and then the electric energy metering result is calculated based on the electric energy accumulation result.
[0003] Since various power integration methods have their own limitations, only by performing power integration processing on instantaneous power through a power integrator with a pre-set power integration method, only the electric energy metering result corresponding to the power integrator can be obtained. For example, only the metering result of forward electric energy can be obtained through a power integrator with a forward power integration method, and the metering result of reverse electric energy, the metering result of absolute value electric energy, and the metering result of algebraic sum electric energy cannot be obtained. Therefore, the electric energy metering result obtained cannot meet different electric energy metering requirements, resulting in low comprehensiveness and applicability of existing electric energy metering methods. Summary of the invention
[0004] In view of this, the embodiments of the present application provide an electric energy metering method, device, electronic device and medium to solve the technical problems of low comprehensiveness and applicability of existing electric energy metering methods.
[0005] In a first aspect, an embodiment of the present application provides an electric energy metering method, comprising:
[0006] Obtain instantaneous power of the power grid;
[0007] The instantaneous power is processed by power integration through at least two groups of power integrators connected in parallel, and the electric energy accumulation results corresponding to each group of power integrators are obtained respectively; wherein the power integration methods performed by the at least two groups of power integrators connected in parallel are not completely the same;
[0008] According to the accumulated electric energy results corresponding to each group of the power integrators, the electric energy measurement results corresponding to each group of the power integrators are calculated respectively.
[0009] Optionally, the power integration mode of any one group of power integrators in the at least two groups of parallel power integrators is determined by the following steps:
[0010] Obtaining the value of the integration mode register corresponding to any group of power integrators;
[0011] A power integration mode of the arbitrary group of power integrators is determined according to the numerical value.
[0012] Optionally, determining the power integration mode of any one group of power integrators according to the numerical value includes:
[0013] If the value is the first value, determining that the power integration mode of the any group of power integrators is an absolute value integration mode;
[0014] If the value is the second value, determining that the power integration method of the arbitrary group of power integrators is an algebraic sum integration method;
[0015] If the value is a third value, determining that the power integration mode of any one group of power integrators is a forward integration mode;
[0016] If the value is the fourth value, it is determined that the power integration mode of the any one group of power integrators is a reverse integration mode.
[0017] Optionally, if the power integration mode of any one group of power integrators is an absolute value integration mode, performing power integration processing on the instantaneous power by using any one group of power integrators includes:
[0018] Obtaining the instantaneous power corresponding to each time period included in the preset time period;
[0019] For each of the time periods, calculating the integral of the absolute value of the instantaneous power in the time period to obtain the accumulated value of electric energy in the time period;
[0020] The electric energy accumulated values corresponding to each of the time periods are added together to obtain the electric energy accumulated result corresponding to the arbitrary group of power integrators.
[0021] Optionally, if the power integration method of any one group of power integrators is an algebraic sum integration method, performing power integration processing on the instantaneous power by using any one group of power integrators includes:
[0022] Obtaining the instantaneous power corresponding to each time period included in the preset time period;
[0023] For each of the time periods, the integral of the instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period;
[0024] The electric energy accumulated values corresponding to each of the time periods are added together to obtain the electric energy accumulated result corresponding to the arbitrary group of power integrators.
[0025] Optionally, if the power integration mode of any one group of power integrators is a forward integration mode, performing power integration processing on the instantaneous power by using any one group of power integrators includes:
[0026] Obtaining the instantaneous power corresponding to each time period included in the preset time period;
[0027] For each of the time periods, the integral of the forward instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period;
[0028] The electric energy accumulated values corresponding to each of the time periods are added together to obtain the electric energy accumulated result corresponding to the arbitrary group of power integrators.
[0029] Optionally, if the power integration mode of any one group of power integrators is a reverse integration mode, performing power integration processing on the instantaneous power by using any one group of power integrators includes:
[0030] Obtaining the instantaneous power corresponding to each time period included in the preset time period;
[0031] For each of the time periods, the integral of the reverse instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period;
[0032] The electric energy accumulated values corresponding to each of the time periods are added together to obtain the electric energy accumulated result corresponding to the arbitrary group of power integrators.
[0033] In a second aspect, an embodiment of the present application provides an electric energy metering device, comprising:
[0034] A power acquisition unit, used to acquire instantaneous power of the power grid;
[0035] A power integration unit, used to perform power integration processing on the instantaneous power through at least two groups of parallel power integrators, and obtain the electric energy accumulation results corresponding to each group of the power integrators; wherein the power integration methods performed by the at least two groups of parallel power integrators are not completely the same;
[0036] The electric energy metering unit is used to calculate the electric energy metering results corresponding to each group of the power integrators according to the electric energy accumulation results corresponding to each group of the power integrators.
[0037] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, each step of the electric energy metering method as described in any one of the first aspects above is implemented.
[0038] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, each step of the electric energy metering method as described in any one of the first aspects above is implemented.
[0039] In a fifth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a terminal device, the terminal device executes each step of the electric energy metering method as described in any one of the first aspects above.
[0040] The embodiments of the present application provide an electric energy metering method, device, electronic device, and medium having the following features:
[0041] Beneficial effects:
[0042] The electric energy metering method provided in the embodiment of the present application obtains the instantaneous power of the power grid, and performs power integration processing on the instantaneous power through at least two groups of parallel power integrators, respectively obtains the electric energy accumulation results corresponding to each group of power integrators, and then calculates the electric energy metering results corresponding to each group of power integrators according to the electric energy accumulation results corresponding to each group of power integrators. Since the power integration methods executed by the at least two groups of parallel power integrators are not exactly the same, the electric energy metering results corresponding to the power integrators with different power integration methods can be obtained at the same time, thereby meeting different electric energy metering requirements in practical applications and improving the comprehensiveness and applicability of the electric energy metering method. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0044] Figure 1 A flowchart of an implementation method of an electric energy metering method provided in an embodiment of the present application;
[0045] Figure 2 A flowchart for implementing a power integration method of a power integrator according to a numerical value provided in an embodiment of the present application;
[0046] Figure 3 A flowchart for implementing power integration processing of instantaneous power by a power integrator provided in an embodiment of the present application;
[0047] Figure 4 Another implementation flow chart of performing power integration processing on instantaneous power by a power integrator provided in an embodiment of the present application;
[0048] Figure 5 A flowchart of another implementation of power integration processing of instantaneous power by a power integrator provided in an embodiment of the present application;
[0049] Figure 6 A flowchart for implementing power integration processing of instantaneous power by a power integrator is also provided in an embodiment of the present application;
[0050] Figure 7 A schematic diagram of the structure of an electric energy metering device provided in an embodiment of the present application
[0051] Figure 8 A schematic diagram of the structure of another electric energy metering device provided in an embodiment of the present application;
[0052] Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0053] It should be noted that the terms used in the embodiments of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application. In the description of the embodiments of the present application, unless otherwise specified, "multiple" refers to two or more than two, and "at least one", "one or more" refers to one, two or more. The terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, it is defined that the "first" and "second" features can explicitly or implicitly include one or more of the features.
[0054] References to "one embodiment" or "some embodiments" etc. described in this specification mean that a particular feature, structure or characteristic described in conjunction with the embodiment is included in one or more embodiments of the present application. Thus, the phrases "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear at different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.
[0055] The execution subject of the electric energy metering method provided in the embodiment of the present application may be an electronic device, which may include a mobile phone, a tablet computer, a laptop computer, a desktop computer, an electric energy metering device, and the like.
[0056] An electric energy metering method provided in an embodiment of the present application can be used to obtain electric energy metering results corresponding to power integrators with different power integration methods, thereby meeting different electric energy metering requirements. Among them, the power integration method may include but is not limited to an absolute value integration method, an algebraic sum integration method, a forward integration method, and a reverse integration method.
[0057] In the traditional electric energy metering method, the instantaneous power is usually integrated by a power integrator with a pre-set power integration mode, so only the electric energy metering result corresponding to the power integrator can be obtained. Since various power integration methods have their own limitations, such as the absolute value integration method cannot distinguish the reverse direction of electric energy, and therefore cannot meet the needs of bidirectional measurement; the algebraic sum integration method will lose energy, and therefore cannot meet the needs of accurate measurement; the forward integration method can only obtain forward electric energy, and cannot obtain reverse electric energy, and therefore cannot meet the needs of bidirectional measurement; the reverse integration method can only obtain reverse electric energy, and cannot obtain forward electric energy, and therefore cannot meet the needs of bidirectional measurement, and the electric energy metering result obtained only through a power integrator with a pre-set power integration method cannot meet different electric energy metering needs, such as only through a power integrator with a forward power integration method can only obtain the forward electric energy metering result, and cannot obtain the reverse electric energy metering result, the absolute value electric energy metering result, and the algebraic sum electric energy metering result; only through a power integrator with a reverse power integration method can only obtain the reverse electric energy metering result, and cannot obtain the forward electric energy metering result, the absolute value electric energy metering result, and the algebraic sum electric energy metering result, and so on. Therefore, it can be seen that the electric energy metering results obtained by the traditional electric energy metering method cannot meet different electric energy metering needs, resulting in the low comprehensiveness and applicability of the existing electric energy metering method.
[0058] When users have different requirements for electric energy metering, they can use electronic devices to execute the various steps of an electric energy metering method provided in an embodiment of the present application, thereby meeting different electric energy metering requirements and thereby improving the comprehensiveness and applicability of the electric energy metering method. Exemplarily, if the user wants to obtain forward electric energy and reverse electric energy at the same time, a group of power integrators with a forward integration mode and a group of power integrators with a reverse integration mode can be pre-set, and then the electric energy metering results corresponding to the power integrators with the forward integration mode and the electric energy metering results corresponding to the power integrators with the reverse integration mode can be obtained respectively, so that the forward electric energy and the reverse electric energy can be obtained at the same time; Exemplarily, if the user wants to obtain forward electric energy, reverse electric energy and absolute value electric energy at the same time, a group of power integrators with a forward integration mode, a group of power integrators with a reverse integration mode and a group of power integrators with an absolute value integration mode can be pre-set, and then the electric energy metering results corresponding to the power integrators with the forward integration mode, the electric energy metering results corresponding to the power integrators with the reverse integration mode and the electric energy metering results corresponding to the power integrators with the absolute value integration mode can be obtained respectively, so that the forward electric energy, the reverse electric energy and the absolute value electric energy can be obtained at the same time.
[0059] See also Figure 1 , Figure 1 The present invention provides an implementation flow chart of an electric energy metering method, which may include S101 to S103, as detailed below:
[0060] In S101 , the instantaneous power of the power grid is obtained.
[0061] In an embodiment of the present application, the electronic device can sample instantaneous current and instantaneous voltage from the power grid in real time at a preset frequency. After the electronic device samples the instantaneous current and instantaneous voltage corresponding to each time period, the instantaneous current and the instantaneous voltage can be multiplied by a pre-set multiplier to obtain the instantaneous power corresponding to each time period. The preset frequency can be set according to actual needs and is not limited here. The duration of each time period can be determined according to the preset frequency. For example, the duration of each time period can be the result of 1 divided by the preset frequency.
[0062] In an embodiment of the present application, the preset frequency may be set to a value greater than a frequency threshold, so that the electronic device may obtain instantaneous power from the power grid at a high frequency.
[0063] In S102, power integration processing is performed on the instantaneous power by at least two groups of power integrators connected in parallel, and the electric energy accumulation results corresponding to each group of power integrators are obtained respectively.
[0064] The power integration modes performed by at least two groups of parallel-connected power integrators are not completely the same.
[0065] In an embodiment of the present application, the power integration method performed by the power integrator may include but is not limited to an absolute value integration method, an algebraic sum integration method, a forward integration method, and a reverse integration method. The number of power integrators and the power integration method performed by each group of power integrators can be pre-set according to actual needs, and are not limited here. Exemplarily, the number of power integrators can be 3 groups, and the power integration methods performed by each group of power integrators can be forward integration methods, reverse integration methods, and absolute value integration methods, respectively. Of course, the power integration methods performed by each group of power integrators can also be various permutations and combinations of various power integration methods.
[0066] After setting the number of power integrators and the power integration method performed by each group of power integrators, the electronic device can perform power integration processing on the instantaneous power of each group of time periods through the set groups of power integrators, thereby obtaining the electric energy accumulation results corresponding to each group of power integrators.
[0067] In a possible implementation, the power integration mode of any one group of power integrators in at least two groups of parallel power integrators can be determined by following steps a and b:
[0068] In step a, the value of the integration mode register corresponding to any group of power integrators is obtained;
[0069] In this implementation, an integration mode register corresponding to the power integrator can be set in the electronic device, based on which the user can change the power integration mode executed by the power integrator by changing the value in the integration mode register. After the user determines the power integration mode executed by the power integrator, the electronic device can obtain the value of the integration mode register corresponding to any set of power integrators.
[0070] In step b, a power integration mode of any group of power integrators is determined according to the numerical value.
[0071] In this implementation, after obtaining the value of the integration mode register corresponding to any group of power integrators, the electronic device can determine the power integration mode of any group of power integrators according to the value. Optionally, the first value can correspond to the absolute value integration mode; the second value can correspond to the algebraic sum integration mode; the third value can correspond to the forward integration mode; and the fourth value can correspond to the reverse integration mode. Based on this, it can be determined by Figure 2 S201 to S204 shown are used to determine the power integration mode of any group of power integrators according to the numerical values. Figure 2A flowchart for implementing a power integration method for determining any group of power integrators according to numerical values provided in an embodiment of the present application.
[0072] In S201, if the value is the first value, it is determined that the power integration mode of any group of power integrators is the absolute value integration mode.
[0073] Exemplarily, the first value may be 00. Based on this, when the electronic device obtains that the value of the integration mode register corresponding to any group of power integrators is 00, the electronic device may determine that the power integration mode of the power integrator is an absolute value integration mode.
[0074] In S202, if the value is the second value, it is determined that the power integration method of any group of power integrators is an algebraic sum integration method.
[0075] Exemplarily, the second value may be 01. Based on this, when the electronic device obtains that the value of the integration mode register corresponding to any group of power integrators is 01, the electronic device may determine that the power integration mode of the power integrator is an algebraic sum integration mode.
[0076] In S203, if the value is the third value, it is determined that the power integration mode of any group of power integrators is a forward integration mode.
[0077] Exemplarily, the third value may be 10. Based on this, when the electronic device obtains that the value of the integration mode register corresponding to any group of power integrators is 10, the electronic device may determine that the power integration mode of the power integrator is a forward integration mode.
[0078] In S204, if the value is the fourth value, it is determined that the power integration mode of any group of power integrators is a reverse integration mode.
[0079] Exemplarily, the fourth value may be 11. Based on this, when the electronic device obtains that the value of the integration mode register corresponding to any group of power integrators is 11, the electronic device may determine that the power integration mode of the power integrator is the directional integration mode.
[0080] In the embodiment of the present application, if the electronic device determines that the power integration mode of any group of power integrators is the absolute value integration mode, the following can be used: Figure 3 S301 to S303 shown are used to implement the step of performing power integration processing on the instantaneous power through any group of power integrators. Figure 3 A flowchart for implementing power integration processing on instantaneous power through any group of power integrators provided in an embodiment of the present application.
[0081] In S301, the instantaneous power corresponding to each time period included in the preset time period is obtained.
[0082] The electronic device can obtain the instantaneous power corresponding to each time period contained in the preset time period. Among them, the preset time period can be set according to actual needs and is not limited here. Exemplarily, a preset time period may include a first time period, a second time period, a third time period, ..., an nth time period. The electronic device can obtain the instantaneous power Spl_P1 corresponding to the first time period, obtain the instantaneous power Spl_P2 corresponding to the second time period, obtain the instantaneous power Spl_P3 corresponding to the third time period, and so on, to obtain the instantaneous power Spl_Pn corresponding to the nth time period. It should be noted that since the electronic device in the embodiment of the present application can obtain the instantaneous voltage of the power grid at a high frequency, the corresponding instantaneous power in each time period can be variable.
[0083] In S302, for each time period, the integral of the absolute value of the instantaneous power in the time period is calculated to obtain the accumulated value of electric energy in the time period.
[0084] The electronic device can calculate the integral of the absolute value of the instantaneous power in each time period within a preset time period, thereby obtaining the accumulated value of the electric energy in the time period.
[0085] Exemplarily, the first time period may be expressed as Δt1, the second time period may be expressed as Δt2, the third time period may be expressed as Δt3, and so on, and the nth time period may be expressed as Δtn. For the first time period, the electronic device can calculate the integral of the absolute value of the instantaneous power Spl_P1 corresponding to the first time period Δt1 within the first time period Δt1, and obtain the accumulated electric energy value of the first time period |Spl_P1Δt1|; for the second time period, the electronic device can calculate the integral of the absolute value of the instantaneous power Spl_P2 corresponding to the second time period Δt2 within the second time period Δt2, and obtain the accumulated electric energy value of the second time period |Spl_P2Δt2|; for the third time period, the electronic device can calculate the integral of the absolute value of the instantaneous power Spl_P3 corresponding to the third time period Δt3 within the third time period Δt3, and obtain the accumulated electric energy value of the third time period |Spl_P3Δt3|, and so on. For the nth time period, the electronic device can calculate the integral of the absolute value of the instantaneous power Spl_Pn corresponding to the nth time period within the mth time period Δtn, and obtain the accumulated electric energy value of the nth time period |Spl_PnΔtn|.
[0086] In S303, the electric energy accumulated values corresponding to each time period are added together to obtain the electric energy accumulated result corresponding to any group of power integrators.
[0087] After obtaining the accumulated electric energy values of each time period, the electronic device can add up the accumulated electric energy values corresponding to each time period to obtain the accumulated electric energy result corresponding to any group of power integrators. For example, after obtaining the accumulated electric energy value of the first time period |Spl_P1Δt1|, the accumulated electric energy value of the second time period |Spl_P2Δt2|, the accumulated electric energy value of the third time period |Spl_P3Δt3|, ..., the accumulated electric energy value of the nth time period |Spl_PnΔtn|, the electronic device can add up the accumulated electric energy values corresponding to each time period to obtain the accumulated electric energy result corresponding to any group of power integrators, that is,
[0088] |Spl_P1Δt1|+|Spl_P2Δt2|+|Spl_P3Δt3|+…|Spl_PnΔtn| is used as the accumulated result of electric energy corresponding to any set of power integrators.
[0089] In the embodiment of the present application, if the electronic device determines that the power integration method of any group of power integrators is an algebraic and integration method, the following can be used: Figure 4 S301 to S402 shown are used to implement the step of performing power integration processing on the instantaneous power through any group of power integrators. Figure 4 Another implementation flowchart of the present application is provided for performing power integration processing on instantaneous power through any group of power integrators.
[0090] In S301, the instantaneous power corresponding to each time period included in the preset time period is obtained.
[0091] For specific steps, please refer to Figure 3 The description of the corresponding embodiments is not repeated here.
[0092] In S401, for each time period, the integral of the instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period.
[0093] The electronic device can calculate the integral of the instantaneous power in each time period within the preset time period, thereby obtaining the accumulated value of the electric energy in the time period.
[0094] Exemplarily, the first time period may be expressed as Δt1, the second time period may be expressed as Δt2, the third time period may be expressed as Δt3, and so on, and the nth time period may be expressed as Δtn. For the first time period, the electronic device can calculate the integral of the instantaneous power Spl_P1 corresponding to the first time period Δt1 within the first time period Δt1, and obtain the accumulated electric energy value Spl_P1Δt1 of the first time period; for the second time period, the electronic device can calculate the integral of the instantaneous power Spl_P2 corresponding to the second time period Δt2 within the second time period Δt2, and obtain the accumulated electric energy value Spl_P2Δt2 of the second time period; for the third time period, the electronic device can calculate the integral of the instantaneous power Spl_P3 corresponding to the third time period Δt3 within the third time period Δt3, and obtain the accumulated electric energy value Spl_P3Δt3 of the third time period; and so on, for the nth time period, the electronic device can calculate the integral of the instantaneous power Spl_Pn corresponding to the nth time period within the mth time period Δtn, and obtain the accumulated electric energy value Spl_PnΔtn of the nth time period.
[0095] In S402, the electric energy accumulated values corresponding to each time period are added together to obtain the electric energy accumulated result corresponding to any group of power integrators.
[0096] After obtaining the accumulated power values of each time period, the electronic device can add up the accumulated power values corresponding to each time period to obtain the accumulated power result corresponding to any group of power integrators. For example, after obtaining the accumulated power value Spl_P1Δt1 of the first time period, the accumulated power value Spl_P2Δt2 of the second time period, the accumulated power value Spl_P3Δt3 of the third time period, ..., the accumulated power value Spl_PnΔtn of the nth time period, the electronic device can add up the accumulated power values corresponding to each time period to obtain the accumulated power result corresponding to any group of power integrators, that is,
[0097] Spl_P1Δt1+Spl_P2Δt2+Spl_P3Δt3+…Spl_PnΔtn is used as the electric energy accumulation result corresponding to any group of power integrators.
[0098] In the embodiment of the present application, if the electronic device determines that the power integration mode of any group of power integrators is a forward integration mode, the following can be used: Figure 5 S301 to S502 shown are used to implement the step of performing power integration processing on the instantaneous power through any group of power integrators. Figure 5 Another implementation flowchart of the present application is provided for performing power integration processing on instantaneous power through any group of power integrators.
[0099] In S301, the instantaneous power corresponding to each time period included in the preset time period is obtained.
[0100] For specific steps, please refer to Figure 3 The description of the corresponding embodiments is not repeated here.
[0101] In S501, for each time period, the integral of the forward instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period.
[0102] The electronic device can calculate the integral of the forward instantaneous power in each time period within a preset time period, thereby obtaining the accumulated value of electric energy in the time period.
[0103] In the embodiment of the present application, the instantaneous power when the power grid outputs power can be used as the forward instantaneous power.
[0104] Exemplarily, the time period in which the instantaneous power is the positive instantaneous power in the first time period can be expressed as Δt1 + , the time period in which the instantaneous power in the second time period is the positive instantaneous power can be expressed as Δt2 + , the time period in which the instantaneous power in the third time period is the positive instantaneous power can be expressed as Δt3 + , and so on, the time period in which the instantaneous power in the nth time period is the positive instantaneous power can be expressed as Δtn + For the first time period, the electronic device may calculate the integral of the forward instantaneous power Spl_P1 corresponding to the first time period Δt1 within the first time period Δt1 to obtain the accumulated electric energy value Spl_P1Δt1 of the first time period. + For the second time period, the electronic device can calculate the integral of the forward instantaneous power Spl_P2 corresponding to the second time period Δt2 within the second time period Δt2 to obtain the accumulated electric energy value Spl_P2Δt2 of the second time period + For the third time period, the electronic device can calculate the integral of the forward instantaneous power Spl_P3 corresponding to the third time period Δt3 within the third time period Δt3 to obtain the accumulated electric energy value Spl_P3Δt3 of the third time period + By analogy, for the nth time period, the electronic device can calculate the integral of the forward instantaneous power Spl_Pn corresponding to the nth time period within the nth time period Δtn, and obtain the accumulated electric energy value Spl_PnΔtn of the nth time period. + .
[0105] In S502, the electric energy accumulated values corresponding to each time period are added together to obtain the electric energy accumulated result corresponding to any group of power integrators.
[0106] After obtaining the accumulated power values of each time period, the electronic device can add up the accumulated power values corresponding to each time period to obtain the accumulated power results corresponding to any group of power integrators. + , the accumulated electric energy value of the second time period Spl_P2Δt2 + , the electric energy accumulated value of the third time period Spl_P3Δt3 + , ..., the accumulated energy value Spl_PnΔtn in the nth time period + After that, the accumulated electric energy values corresponding to each time period can be added together to obtain the accumulated electric energy results corresponding to any group of power integrators.
[0107] Spl_P1Δt1 + +Spl_P2Δt2 + +Spl_P3Δt3 + +……Spl_PnΔtn + As the accumulated result of electric energy corresponding to any group of power integrators.
[0108] In the embodiment of the present application, if the electronic device determines that the power integration mode of any group of power integrators is a reverse integration mode, the following can be used: Figure 6 S301 to S602 shown are used to implement the step of performing power integration processing on the instantaneous power through any group of power integrators. Figure 6 Also provided in the embodiment of the present application is a flowchart for implementing power integration processing on instantaneous power through any group of power integrators.
[0109] In S301, the instantaneous power corresponding to each time period included in the preset time period is obtained.
[0110] For specific steps, please refer to Figure 3 The description of the corresponding embodiments is not repeated here.
[0111] In S601, for each time period, the integral of the reverse instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period.
[0112] The electronic device can calculate the integral of the reverse instantaneous power in each time period within a preset time period, thereby obtaining the accumulated value of electric energy in the time period.
[0113] In the embodiment of the present application, the instantaneous power when the grid inputs power can be used as the reverse instantaneous power.
[0114] Exemplarily, the time period during which the instantaneous power in the first time period is the reverse instantaneous power can be expressed as Δt1 —, the time period in which the instantaneous power in the second time period is the reverse instantaneous power can be expressed as Δt2 — , the time period in which the instantaneous power in the third time period is the reverse instantaneous power can be expressed as Δt3 — , and so on, the time period in which the instantaneous power in the nth time period is the reverse instantaneous power can be expressed as Δtn — For the first time period, the electronic device may calculate the integral of the reverse instantaneous power Spl_P1 corresponding to the first time period Δt1 within the first time period Δt1 to obtain the accumulated electric energy value Spl_P1Δt1 of the first time period. — For the second time period, the electronic device can calculate the integral of the reverse instantaneous power Spl_P2 corresponding to the second time period Δt2 within the second time period Δt2 to obtain the accumulated electric energy value Spl_P2Δt2 of the second time period — For the third time period, the electronic device can calculate the integral of the reverse instantaneous power Spl_P3 corresponding to the third time period Δt3 within the third time period Δt3 to obtain the accumulated electric energy value Spl_P3Δt3 of the third time period — By analogy, for the nth time period, the electronic device can calculate the integral of the reverse instantaneous power Spl_Pn corresponding to the nth time period within the nth time period Δtn, and obtain the accumulated electric energy value Spl_PnΔtn of the nth time period. — .
[0115] In S602, the electric energy accumulated values corresponding to each time period are added together to obtain the electric energy accumulated result corresponding to any group of power integrators.
[0116] After obtaining the accumulated power values of each time period, the electronic device can add up the accumulated power values corresponding to each time period to obtain the accumulated power results corresponding to any group of power integrators. — , the accumulated electric energy value of the second time period Spl_P2Δt2 — , the electric energy accumulated value of the third time period Spl_P3Δt3 — , ..., the accumulated energy value Spl_PnΔtn in the nth time period — After that, the accumulated electric energy values corresponding to each time period can be added together to obtain the accumulated electric energy results corresponding to any group of power integrators.
[0117] Spl_P1Δt1 — +Spl_P2Δt2 — +Spl_P3Δt3 — +……Spl_PnΔtn — As the accumulated result of electric energy corresponding to any group of power integrators.
[0118] In S103, the electric energy measurement results corresponding to each group of power integrators are calculated and obtained according to the electric energy accumulation results corresponding to each group of power integrators.
[0119] In the embodiment of the present application, after obtaining the electric energy accumulation result corresponding to each group of power integrators, the electronic device can calculate the electric energy measurement result corresponding to each group of power integrators. Specifically, for each group of power integrators, the electric energy accumulation result obtained by the power integrator can be accumulated into the fast pulse counter.
[0120] When the accumulated energy of the fast pulse counter reaches an energy of a pulse constant, the fast pulse counter can control the energy register to accumulate one unit of energy. The fast pulse counter can also control the energy register to output an energy pulse.
[0121] The pulse constants of the fast pulse counters corresponding to the power integrators can be set according to actual needs.
[0122] against Figures 1 to 6 Corresponding to each embodiment, in order to better understand the technical effects brought about by the present application, examples of practical applications are given below.
[0123] For example, three groups of power integrators can be connected in parallel, and the power integration modes of the three groups of power integrators can be forward integration mode, reverse integration mode and absolute value integration mode respectively. Figures 1 to 6 The corresponding steps in each embodiment can obtain the measurement results of forward electric energy, reverse electric energy and absolute value electric energy, thereby solving the major problem that the traditional electric energy integration unit cannot cope with frequent switching between forward and reverse directions when using the algebraic sum method, and realizing accurate bidirectional measurement.
[0124] Of course, the number of power integrators and the integration method of each power integrator may be set according to actual applications to obtain a desired effect, which will not be elaborated here.
[0125] See also Figure 7 , Figure 7 This is a schematic diagram of the structure of an electric energy metering device provided in an embodiment of the present application. Figure 7 As shown, the electric energy metering device may include a multiplier 71, a first power integrator 72, a second power integrator 73, a third power integrator 74, a first fast pulse counter 75, a second fast pulse counter 76, a third fast pulse counter 77, a first electric energy register 78, a second electric energy register 79 and a third electric energy register 710.
[0126] Among them, the multiplier 71 is used to obtain the instantaneous current and instantaneous voltage of the power grid, and obtain the instantaneous power according to the instantaneous current and instantaneous voltage of the power grid. The first power integrator 72, the second power integrator 73 and the third power integrator 74 can respectively obtain the electric energy accumulation results corresponding to the first power integrator 72, the second power integrator 73 and the third power integrator 74 in a forward integration mode, a reverse integration mode and an absolute value integration mode. Exemplarily, the instantaneous power can be integrated by the first power integrator 72 in a forward integration mode, the instantaneous power can be integrated by the second power integrator 73 in a reverse integration mode, and the instantaneous power can be integrated by the third power integrator 74 in an absolute value integration mode. The first power integrator 72 can accumulate the electric energy accumulation result into the first fast pulse counter 75, the second power integrator 73 can accumulate the electric energy accumulation result into the second fast pulse counter 76, and the third power integrator 74 can accumulate the electric energy accumulation result into the third fast pulse counter 77. When the accumulated energy of the first fast pulse counter 75 reaches a pulse constant of energy, the first energy register 78 can be controlled to accumulate a unit of energy and output an energy pulse. When the accumulated energy of the second fast pulse counter 76 reaches a pulse constant of energy, the second energy register 79 can be controlled to accumulate a unit of energy and output an energy pulse. When the accumulated energy of the third fast pulse counter 77 reaches a pulse constant of energy, the third energy register 710 can be controlled to accumulate a unit of energy and output an energy pulse.
[0127] It should be noted that Figure 7 The electric energy metering device provided is only an example and is not intended to limit the present application.
[0128] It can be seen from the above that the electric energy metering method provided in the embodiment of the present application obtains the instantaneous power of the power grid, and performs power integration processing on the instantaneous power through at least two groups of parallel power integrators, respectively obtains the electric energy accumulation results corresponding to each group of power integrators, and then calculates the electric energy metering results corresponding to each group of power integrators according to the electric energy accumulation results corresponding to each group of power integrators. Since the power integration methods executed by at least two groups of parallel power integrators are not exactly the same, the power integration methods executed by each power integrator can be set according to the needs of electric energy metering in actual applications, so as to obtain the electric energy metering results corresponding to each power integrator, so as to meet the different needs of electric energy metering in actual applications, and improve the comprehensiveness and applicability of the electric energy metering method.
[0129] Based on the electric energy metering method provided in the above embodiment, the present application further provides an electric energy metering device for implementing the above method embodiment. Figure 8 , Figure 8 This is a schematic diagram of the structure of another electric energy metering device provided in an embodiment of the present application. Figure 8 As shown, the electric energy metering device 80 may include a power acquisition unit 81, a power integration unit 82 and an electric energy metering unit 83. Among them:
[0130] The power acquisition unit 81 is used to acquire the instantaneous power of the power grid.
[0131] The power integration unit 82 is used to perform power integration processing on the instantaneous power through at least two groups of parallel power integrators to obtain the electric energy accumulation results corresponding to each group of power integrators; wherein the power integration methods executed by at least two groups of parallel power integrators are not exactly the same.
[0132] The electric energy metering unit 83 is used to calculate the electric energy metering results corresponding to each group of power integrators according to the electric energy accumulation results corresponding to each group of power integrators.
[0133] Optionally, the electric energy metering device 80 may further include a second acquisition unit and a first determination unit.
[0134] The second acquisition unit is used to acquire the value of the integration mode register corresponding to any group of power integrators.
[0135] The first determining unit is used to determine a power integration mode of any group of power integrators according to a numerical value.
[0136] Optionally, the first determining unit is specifically configured to:
[0137] If the value is the first value, it is determined that the power integration mode of any group of power integrators is the absolute value integration mode;
[0138] If the value is the second value, it is determined that the power integration method of any group of power integrators is an algebraic sum integration method;
[0139] If the value is the third value, it is determined that the power integration mode of any group of power integrators is a forward integration mode;
[0140] If the value is the fourth value, it is determined that the power integration mode of any group of power integrators is a reverse integration mode.
[0141] Optionally, if the power integration mode of any group of power integrators is an absolute value integration mode, the power integration unit 82 is specifically used for:
[0142] Obtaining the instantaneous power corresponding to each time period included in the preset time period;
[0143] For each of the time periods, calculating the integral of the absolute value of the instantaneous power in the time period to obtain the accumulated value of electric energy in the time period;
[0144] The accumulated electric energy values corresponding to each time period are added together to obtain the accumulated electric energy results corresponding to any group of power integrators.
[0145] Optionally, if the power integration method of any group of power integrators is an algebraic sum integration method, the power integration unit 82 is specifically used for:
[0146] Obtaining the instantaneous power corresponding to each time period included in the preset time period;
[0147] For each of the time periods, the integral of the instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period;
[0148] The accumulated electric energy values corresponding to each time period are added together to obtain the accumulated electric energy results corresponding to any group of power integrators.
[0149] Optionally, if the power integration mode of any group of power integrators is a forward integration mode, the power integration unit 82 is specifically used for:
[0150] Obtaining the instantaneous power corresponding to each time period included in the preset time period;
[0151] For each of the time periods, the integral of the forward instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period;
[0152] The electric energy accumulated values corresponding to each of the time periods are added together to obtain the electric energy accumulated result corresponding to the arbitrary group of power integrators.
[0153] Optionally, if the power integration mode of any group of power integrators is a reverse integration mode, the power integration unit 82 is specifically used for:
[0154] Obtaining the instantaneous power corresponding to each time period included in the preset time period;
[0155] For each of the time periods, the integral of the reverse instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period;
[0156] The electric energy accumulated values corresponding to each of the time periods are added together to obtain the electric energy accumulated result corresponding to the arbitrary group of power integrators.
[0157] It should be noted that the information interaction, execution process and other contents between the above-mentioned units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be specifically referred to the method embodiment part and will not be repeated here.
[0158] See also Fig. 9 , Fig. 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Fig. 9 As shown, the electronic device 9 provided in this embodiment may include: a processor 90, a memory 91, and a computer program 92 stored in the memory 91 and executable on the processor 90. For example, a program corresponding to the electric energy metering method. When the processor 90 executes the computer program 92, the steps applied to the electric energy metering method embodiment are implemented, for example Figure 1 S101 to S103 shown, Figure 2 S201 to S204 shown, Figure 3 S301~S303, Figure 4 S301~S402, Figure 5 S301~S502 and Figure 6 Alternatively, when the processor 90 executes the computer program 92, the functions of each module / unit in the embodiment corresponding to the electronic device 9 are realized, for example Figure 8 The functions of the units 81 to 83 are shown.
[0159] Exemplarily, the computer program 92 may be divided into one or more modules / units, one or more modules / units are stored in the memory 91 and executed by the processor 90 to complete the present application. One or more modules / units may be a series of computer program instruction segments that can complete specific functions, and the instruction segments are used to describe the execution process of the computer program 92 in the electronic device 9. For example, the computer program 92 may be divided into a power acquisition unit 81, a power integration unit 82, and an electric energy metering unit 83. For the specific functions of each unit, please refer to Figure 8 The relevant descriptions in the corresponding embodiments are not repeated here.
[0160] Those skilled in the art will understand that Fig. 9 The electronic device 9 is merely an example and does not limit the electronic device 9 , and may include more or less components than those shown in the figure, or may combine certain components, or may include different components.
[0161] The processor 90 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0162] The memory 91 may be an internal storage unit of the electronic device 9, such as a hard disk or memory of the electronic device 9. The memory 91 may also be an external storage device of the electronic device 9, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, or a flash card, etc., equipped on the electronic device 9. Further, the memory 91 may also include both an internal storage unit of the electronic device 9 and an external storage device. The memory 91 is used to store computer programs and other programs and data required by the electronic device. The memory 91 may also be used to temporarily store data that has been output or is to be output.
[0163] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units is used as an example for illustration. In actual applications, the above-mentioned functions can be assigned to different functional units as needed, that is, the internal structure of the electric energy metering device can be divided into different functional units to complete all or part of the functions described above. The functional units in the embodiment can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0164] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.
[0165] An embodiment of the present application provides a computer program product. When the computer program product is executed on an electronic device, the electronic device implements the steps in the above-mentioned method embodiments.
[0166] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0167] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0168] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for measuring electric energy, characterized in that: include: Obtain instantaneous power of the power grid; The instantaneous power is subjected to power integration processing by at least three groups of power integrators connected in parallel, and the accumulated electric energy results corresponding to each group of the power integrators are obtained respectively; wherein the power integration modes executed by the at least three groups of power integrators connected in parallel are not completely the same; the power integration modes executed by the power integrators include an absolute value integration mode, an algebraic sum integration mode, a forward integration mode, and a reverse integration mode; According to the accumulated electric energy results corresponding to each group of the power integrators, the electric energy measurement results corresponding to each group of the power integrators are calculated respectively; The acquiring of the instantaneous power of the power grid comprises: sampling the instantaneous current and the instantaneous voltage from the power grid in real time at a preset frequency, and performing multiplication operation on the instantaneous current and the instantaneous voltage by a preset multiplier to obtain the instantaneous power corresponding to each time period; The power integration mode of any one group of power integrators among the at least three groups of power integrators connected in parallel is determined by the following steps: Obtaining the value of the integration mode register corresponding to any group of power integrators; Determining a power integration mode of any one group of power integrators according to the numerical value; Determining the power integration mode of any one group of power integrators according to the numerical value includes: If the value is the first value, determining that the power integration mode of the any group of power integrators is the absolute value integration mode; If the value is the second value, determining the power integration method of the arbitrary group of power integrators to be the algebraic sum integration method; If the value is the third value, determining that the power integration mode of the any group of power integrators is the forward integration mode; If the value is the fourth value, it is determined that the power integration mode of the any group of power integrators is the reverse integration mode.
2. The electric energy metering method according to claim 1, characterized in that: If the power integration mode of any one group of power integrators is an absolute value integration mode, performing power integration processing on the instantaneous power by using any one group of power integrators includes: Obtaining the instantaneous power corresponding to each time period included in the preset time period; For each of the time periods, calculating the integral of the absolute value of the instantaneous power in the time period to obtain the accumulated value of electric energy in the time period; The electric energy accumulated values corresponding to each of the time periods are added together to obtain the electric energy accumulated result corresponding to the arbitrary group of power integrators.
3. The electric energy metering method according to claim 1, characterized in that: If the power integration method of any one group of power integrators is an algebraic sum integration method, performing power integration processing on the instantaneous power by using any one group of power integrators includes: Obtaining the instantaneous power corresponding to each time period included in the preset time period; For each of the time periods, the integral of the instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period; The electric energy accumulated values corresponding to each of the time periods are added together to obtain the electric energy accumulated result corresponding to the arbitrary group of power integrators.
4. The electric energy metering method according to claim 1, characterized in that: If the power integration mode of any one group of power integrators is a forward integration mode, performing power integration processing on the instantaneous power by using any one group of power integrators includes: Obtaining the instantaneous power corresponding to each time period included in the preset time period; For each of the time periods, the integral of the forward instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period; The electric energy accumulated values corresponding to each of the time periods are added together to obtain the electric energy accumulated result corresponding to the arbitrary group of power integrators.
5. The electric energy metering method according to claim 1, characterized in that: If the power integration mode of any one group of power integrators is a reverse integration mode, performing power integration processing on the instantaneous power by using any one group of power integrators includes: Obtaining the instantaneous power corresponding to each time period included in the preset time period; For each of the time periods, the integral of the reverse instantaneous power in the time period is calculated to obtain the accumulated electric energy value of the time period; The electric energy accumulated values corresponding to each of the time periods are added together to obtain the electric energy accumulated result corresponding to the arbitrary group of power integrators.
6. An electric energy metering device, characterized in that: include: A power acquisition unit, used to acquire instantaneous power of the power grid; A power integration unit, used for performing power integration processing on the instantaneous power through at least three groups of power integrators connected in parallel, and obtaining the electric energy accumulation results corresponding to each group of the power integrators respectively; wherein the power integration modes executed by the at least three groups of power integrators connected in parallel are not completely the same; the power integration modes executed by the power integrators include absolute value integration mode, algebraic sum integration mode, forward integration mode and reverse integration mode; An electric energy metering unit, used for calculating the electric energy metering results corresponding to each group of the power integrators according to the electric energy accumulation results corresponding to each group of the power integrators; The electric energy metering unit is specifically used for: The instantaneous current and the instantaneous voltage are sampled in real time from the power grid at a preset frequency, and the instantaneous current and the instantaneous voltage are multiplied by a preset multiplier to obtain the instantaneous power corresponding to each time period; The electric energy metering device also includes a power integration mode determination unit; The power integration mode determination unit is specifically used for: Get the value of the integration mode register corresponding to any group of power integrators; Determining a power integration mode of any one group of power integrators according to the numerical value; The power integration mode determination unit is specifically used for: If the value is the first value, determining that the power integration mode of the any group of power integrators is the absolute value integration mode; If the value is the second value, determining that the power integration method of the arbitrary group of power integrators is the algebraic sum integration method; If the value is the third value, determining that the power integration mode of the any group of power integrators is the forward integration mode; If the value is the fourth value, it is determined that the power integration mode of the any group of power integrators is the reverse integration mode.
7. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, each step of the electric energy metering method according to any one of claims 1 to 5 is implemented.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, each step of the electric energy metering method according to any one of claims 1 to 5 is implemented.
