CN107436380B - Method and device for generating electric energy pulse - Google Patents

Method and device for generating electric energy pulse Download PDF

Info

Publication number
CN107436380B
CN107436380B CN201610364873.XA CN201610364873A CN107436380B CN 107436380 B CN107436380 B CN 107436380B CN 201610364873 A CN201610364873 A CN 201610364873A CN 107436380 B CN107436380 B CN 107436380B
Authority
CN
China
Prior art keywords
path
pulse
power
module
bit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610364873.XA
Other languages
Chinese (zh)
Other versions
CN107436380A (en
Inventor
王红美
袁文师
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Beiling Co Ltd
Original Assignee
Shanghai Beiling Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Beiling Co Ltd filed Critical Shanghai Beiling Co Ltd
Priority to CN201610364873.XA priority Critical patent/CN107436380B/en
Publication of CN107436380A publication Critical patent/CN107436380A/en
Application granted granted Critical
Publication of CN107436380B publication Critical patent/CN107436380B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R22/00Arrangements for measuring time integral of electric power or current, e.g. electricity meters
    • G01R22/06Arrangements for measuring time integral of electric power or current, e.g. electricity meters by electronic methods

Abstract

The invention discloses a method and a device for generating electric energy pulse, wherein the method comprises the following steps: dividing the input instantaneous power into a first path and a second path, judging whether the instantaneous power is positive power or negative power for the first path, if the instantaneous power is positive, calculating the accumulated sum of instantaneous values of the instantaneous power, and if the instantaneous power is negative, taking an absolute value and calculating the accumulated sum of the absolute values; for the second path, calculating an accumulated sum of instantaneous values or an accumulated sum of absolute values of the instantaneous power; and respectively judging the accumulation sum of the first path and the accumulation sum of the second path according to the frequency selection value, enabling or disabling the first pulse generation module based on the judgment result of the first path, and enabling or disabling the second pulse generation module based on the judgment result of the second path. The invention can make up the defects of complicated algorithm of electric energy pulse, large number of registers and high hardware resource expenditure in the prior art, and has the advantages of simplifying the algorithm and structure.

Description

Method and device for generating electric energy pulse
Technical Field
The invention belongs to the field of electric energy metering, and particularly relates to an electric energy pulse generation method and device.
Background
With the recent trend of the competition in the metering chip market becoming increasingly white, the improvement of metering performance, the improvement of functions and the reduction of cost are the pursuing directions of various manufacturers. The electric energy pulse is used as the most basic function of the electric energy meter, is a mode of measuring an electric energy value by the electric energy meter, specifically, the instantaneous power of a user is accumulated into energy and is output in a pulse form, a basis is provided for trade settlement among power generation enterprises, power transmission and distribution enterprises and electric power users, and the accuracy of the electric energy pulse directly influences benefits of the power generation enterprises, the power transmission and distribution enterprises and the electric power users and the rationality of trade.
The calculation method of the electric energy pulse is quite a lot, but the precision and realization cost of metering are the final concern. Most of the prior art obtains energy by accumulating instantaneous power and then outputs electric energy pulse further according to set threshold comparison, but the algorithm is complex, a large number of registers are needed, the hardware resource cost is high, and the method is not allowed for metering chips with extremely severe area and power consumption requirements.
Disclosure of Invention
The invention aims to overcome the defects that in the prior art, algorithms of electric energy pulses are complex, a large number of registers are needed and the hardware resource cost is high.
The invention solves the technical problems through the following technical scheme:
the electric energy pulse generating method is characterized by comprising the following steps:
S 1 dividing the input instantaneous power into a first path and a second path, and executing S for the first path 11 Execute S for the second path 12
S 11 Judging whether the instantaneous power is positive power or negative power, if the instantaneous power is positive power, calculating the accumulated sum of instantaneous values of the instantaneous power to be used for calculating the energy of the positive power, and if the instantaneous power is negative power, taking the absolute value of the instantaneous values of the negative power and calculating the accumulated sum of the absolute values to be used for calculating the energy of the absolute values of the negative power;
S 12 calculating an accumulated sum of instantaneous values of the instantaneous power or an accumulated sum of absolute values of the instantaneous values for calculating an energy of the accumulated sum of instantaneous power or an energy of the accumulated sum of absolute values;
S 2 the method comprises the steps of respectively judging the accumulation sum of a first path and the accumulation sum of a second path according to a frequency selection value, enabling or disabling a first pulse generation module based on the judgment result of the first path, and enabling or disabling a second pulse generation module based on the judgment result of the second path;
S 3 if the first pulse generating module is enabled, generating an electric energy pulse and a first energy clearing signal, and if the second pulse generating module is enabled, generating an electric energy pulse and a second energy clearing signal;
the frequency selection value is used for adjusting the output frequency of the electric energy pulse generated by the first pulse generation module and the second pulse generation module.
Preferably S 2 Comprising the following steps:
judging whether the absolute value of the accumulated sum of the first path is larger than or equal to 2 (x), if so, enabling the first pulse generation module, otherwise, not enabling the first pulse generation module;
judging whether the absolute value of the accumulated sum of the second paths is larger than or equal to 2 (x), if so, enabling the second pulse generation module, and if not, enabling the second pulse generation module;
x is a positive integer and corresponds to the frequency selection value.
Preferably, the sum of the first path and the sum of the second path are both binary counts, S 3 Comprising the following steps:
if the first pulse generating module is enabled, enabling electric energy pulse generation and generation of the first energy clearing signal by using the x bit of the accumulated sum of the first paths;
if the second pulse generation module is enabled, the power pulse generation and the second energy clearing signal are enabled by the exclusive OR result of the x bit and the (x+1) bit of the accumulated sum of the second path.
Preferably, the generating of the power pulse with the x-th bit of the accumulated sum of the first paths includes: judging whether the x bit of the accumulated sum of the first path is valid, if so, generating an electric energy pulse, and if not, not generating the electric energy pulse;
enabling power pulse generation with an exclusive or result of an x-th bit and an (x+1) -th bit of the accumulated sum of the second way includes: and judging whether an exclusive OR result of the x bit and the (x+1) bit of the accumulated sum of the second path is effective, if so, generating an electric energy pulse, and if not, not generating the electric energy pulse.
Preferably, the first energy-clearing signal is used for subtracting 2 (x) from the absolute value of the accumulated sum of the first path, and taking the rest part as the initial value of the accumulated sum of the first path calculated next time;
the second energy-scavenging signal is used to subtract 2 x from the absolute value of the second path's accumulated sum and take the remaining portion as the initial value for the next calculation of the second path's accumulated sum.
An electric energy pulse generating device, characterized by comprising: the device comprises a positive and negative power judging module, a first accumulating module, a first judging module and a first pulse generating module which are sequentially connected, and a second accumulating module, a second judging module and a second pulse generating module which are sequentially connected;
the positive and negative power judging module is used for inputting one path of instantaneous power, marking the path as a first path, judging whether the instantaneous power of the first path is positive power or negative power, if the instantaneous power is positive power, calling the first accumulating module to calculate the accumulated sum of instantaneous values of the instantaneous power so as to be used for calculating the energy of the positive power, and if the instantaneous power is negative power, calling the first accumulating module to take the absolute value of the instantaneous values of the negative power and calculate the accumulated sum of the absolute value so as to be used for calculating the energy of the absolute value of the negative power;
the first judging module is used for judging the accumulation sum of the first paths according to the frequency selection value, enabling or disabling the first pulse generating module based on the judging result of the first paths, generating a first energy clearing signal when the first pulse generating module is enabled, and feeding back the first energy clearing signal to the first accumulation module;
the first pulse generation module is used for generating electric energy pulses;
the second accumulation module is used for inputting the other path of the instantaneous power, recording the other path as a second path, and calculating the accumulation sum of instantaneous values or the accumulation sum of absolute values of the instantaneous values of the second path so as to be used for calculating the energy of the accumulation sum of the instantaneous power or the energy of the accumulation sum of the absolute values;
the second judging module is used for judging the accumulation sum of the second path according to the frequency selection value, enabling or disabling the second pulse generating module based on the judging result of the second path, generating a second energy clearing signal when the second pulse generating module is enabled, and feeding back the second energy clearing signal to the second accumulation module;
the second pulse generation module is used for generating electric energy pulses;
the frequency selection value is used to adjust the output frequency of the electrical energy pulses generated by the first pulse generation module and the second pulse.
Preferably, the first judging module is further configured to judge whether an absolute value of the accumulated sum of the first paths is greater than or equal to 2 (x), if yes, enable the first pulse generating module, and if not, enable the first pulse generating module;
the second judging module is further configured to judge whether an absolute value of the accumulated sum of the second path is greater than or equal to 2 (x), if yes, enable the second pulse generating module, and if not, disable the second pulse generating module;
x is a positive integer and corresponds to the frequency selection value.
Preferably, the accumulated sums of the first path and the second path adopt binary counts;
the first pulse generation module is used for enabling electric energy pulse generation by using the x-th bit of the accumulated sum of the first paths;
the second pulse generation module is used for enabling the generation of the electric energy pulse by using the exclusive OR result of the x bit and the (x+1) bit of the accumulated sum of the second path.
Preferably, the generating of the power pulse with the x-th bit of the accumulated sum of the first paths includes: judging whether the x bit of the accumulated sum of the first path is valid, if so, generating an electric energy pulse, and if not, not generating the electric energy pulse;
enabling power pulse generation with an exclusive or result of an x-th bit and an (x+1) -th bit of the accumulated sum of the second way includes: and judging whether an exclusive OR result of the x bit and the (x+1) bit of the accumulated sum of the second path is effective, if so, generating an electric energy pulse, and if not, not generating the electric energy pulse.
Preferably, the first energy-clearing signal is used for subtracting 2 (x) from the absolute value of the accumulated sum of the first path, and taking the rest part as the initial value of the accumulated sum of the first path calculated next time;
the second energy-scavenging signal is used to subtract 2 x from the absolute value of the second path's accumulated sum and take the remaining portion as the initial value for the next calculation of the second path's accumulated sum.
Preferably, the positive and negative power judging module includes: a symbol detection unit and an absolute value taking unit;
the sign detection unit is used for inputting one path of instantaneous power, marking the path as a first path, detecting whether sign bits of the instantaneous power of the first path are positive or negative, outputting the detected instantaneous power with the sign bit being positive to the first accumulation module if the energy of the positive power is calculated, taking a zero value of the detected instantaneous power with the sign bit being negative and outputting the zero value of the detected instantaneous power to the first accumulation module if the energy of the negative power is calculated, calling the absolute value taking unit to take an absolute value of the detected instantaneous power with the sign bit being negative and outputting the absolute value to the first accumulation module, and taking the detected instantaneous power with the sign bit being positive to the zero value and outputting the zero value of the detected instantaneous power to the first accumulation module;
the first accumulation module includes: a first accumulator and a first accumulation sum register having a clearing function;
the first accumulator is used for accumulating input instantaneous power;
the first accumulation and register is used for storing the accumulation result of the first accumulator and receiving the first energy clearing signal;
the second accumulation module includes: a second accumulator and register having a clear function;
the second accumulator is used for accumulating the instantaneous value of the input instantaneous power or the absolute value of the instantaneous value;
the second accumulation and register is used for storing the accumulation result of the second accumulator and receiving the second energy clearing signal.
Preferably, the first pulse generating module includes: a first bit detection unit and a first pulse generator;
the first bit detection unit is used for detecting whether the x bit of the accumulation sum of the first path is valid or not, and enabling the first pulse generator to generate electric energy pulses when the x bit is valid;
the second pulse generation module includes: an exclusive-or gate, a second detection unit, and a second pulse generator;
the exclusive OR gate is used for exclusive-or of the x bit and the (x+1) bit of the accumulated sum of the second path;
the second detection unit is used for detecting whether the exclusive or result of the exclusive or gate is valid or not, and enabling the second pulse generator to generate the electric energy pulse when the exclusive or result is valid.
On the basis of conforming to the common knowledge in the field, the above preferred conditions can be arbitrarily combined to obtain the preferred examples of the invention.
The invention has the positive progress effects that: on the premise of ensuring the pulse accuracy and precision, a unique energy pulse generation mode is adopted, so that the method has the advantages of being simple in algorithm and simplified in structure, meanwhile, the use of a register is greatly reduced, and hardware resources are well saved.
Drawings
FIG. 1 is a flow chart showing a method for generating a power pulse according to a preferred embodiment of the present invention.
FIG. 2 is a flow chart showing a second path of the input instantaneous power according to the method for generating the electric energy pulse according to the preferred embodiment of the invention.
FIG. 3 is a schematic diagram showing a signal flow for calculating the sum of instantaneous values of instantaneous power and generating electric energy pulses in the second path of the input instantaneous power according to the preferred embodiment of the present invention.
Fig. 4 is a block diagram of an electric energy pulse generating apparatus according to a preferred embodiment of the present invention.
Detailed Description
The invention is further illustrated by means of the following examples, which are not intended to limit the scope of the invention.
Examples
A method of generating pulses of electrical energy comprising dividing an input instantaneous power into a first path, as shown in fig. 1, and a second path, steps 101-106 are performed, and steps 201-204 are performed for the second path, as shown in fig. 2.
Step 101, judging whether the instantaneous power is positive power or negative power, if the instantaneous power is positive power, executing step 102, and if the instantaneous power is negative power, executing step 103;
step 102, calculating an accumulated sum of instantaneous values of the instantaneous power for calculating energy (i.e. electric energy) of the forward power, and then performing step 104;
step 103, taking the absolute value of the instantaneous value of the negative power and calculating the accumulated sum of the absolute values for calculating the energy (i.e. the electric energy) of the absolute value of the negative power, and then executing step 104;
step 104, judging whether the absolute value of the accumulated sum of the first path is greater than or equal to 2 (x), if yes, executing step 105, and if no, executing step 106;
step 105, enabling a first pulse generating module to generate and generate a first energy clearing signal by using an x-th bit enabling power pulse of the accumulated sum of the first path, wherein the accumulated sum of the first path adopts binary counting, and the generation of the x-th bit enabling power pulse of the accumulated sum of the first path comprises: judging whether the x-th bit of the accumulation sum of the first path is valid (namely 1 or 0), if yes (namely 1), generating an electric energy pulse, otherwise (namely 0), not generating an electric energy pulse, wherein the first energy clearing signal is used for subtracting 2 (x) from the absolute value of the accumulation sum of the first path, and taking the rest part as an initial value of the accumulation sum of the first path to be calculated next time, wherein the rest part is the value of the absolute value of the accumulation sum of the first path after subtracting 2 (x) from the absolute value of the accumulation sum of the first path;
step 106, the first pulse generation module is disabled.
Step 201, calculating an accumulated sum of instantaneous values or an accumulated sum of absolute values of the instantaneous power for calculating energy of the accumulated sum of instantaneous powers or energy of the accumulated sum of absolute values (i.e. electric energy);
step 202, judging whether the absolute value of the accumulated sum of the second path is greater than or equal to 2 (x), if yes, executing step 203, otherwise, executing step 204;
step 203, enabling a second pulse generating module to enable generation of a power pulse by using an exclusive or result of an xth bit and an (x+1) th bit of the second path of accumulation sum and generate a second energy clearing signal, wherein the second path of accumulation sum adopts binary counting, and the generation of the power pulse by using the exclusive or result of the xth bit and the (x+1) th bit of the second path of accumulation sum includes: judging whether an exclusive OR result of an x-th bit and an (x+1) -th bit of the second path of the accumulation sum is valid (namely 1 or 0), if so (namely 1), generating a power pulse, otherwise (namely 0), not generating the power pulse, wherein the second energy clearing signal is used for subtracting 2 (x) from the absolute value of the second path of the accumulation sum, and taking the rest part as an initial value of the second path of the accumulation sum calculated next time, wherein the rest part is a value obtained by subtracting the absolute value of the second path of the accumulation sum after 2 (x) from the absolute value of the second path of the accumulation sum;
step 204, the second pulse generation module is disabled.
The frequency selection value can be set by a user and is used for adjusting the output frequency of the electric energy pulse generated by the first pulse generation module and the second pulse generation module, namely, the output frequency of the electric energy pulse generated by the first pulse generation module is equal to the frequency selection value, and the output frequency of the electric energy pulse generated by the second pulse generation module is equal to the frequency selection value;
in order to adapt to different application environments, under the same input signal, different frequency selection values select to output electric energy pulses with different output frequencies;
and x is a positive integer and corresponds to the frequency selection value, when the frequency selection values are different, the value of x is different, the higher the frequency selection value is, namely the faster the required electric energy pulse is output, the smaller the value of x is, the frequency selection value is doubled when the value of x is reduced by 1, and a user can automatically set the value of x by combining the frequency selection values according to own needs.
Fig. 3 is a schematic diagram of a signal flow for calculating a summation (i.e., algebraic sum) of instantaneous values of instantaneous power and generating a power pulse in the second path of the input instantaneous power according to the present embodiment. the instant power at the time t0 is positive, and the instant power is accumulated; at time t1, the sum1 reaches 2 (x) corresponding to the frequency selection value, the exclusive OR result of the x-th bit and the (x+1) -th bit of sum1 enables the generation of the electric energy pulse, namely, outputs an electric energy pulse, and simultaneously generates an energy clearing signal (the energy clearing signals in the section are all second energy clearing signals) so that the sum1 is subtracted by 2 (x), the rest value is used as the initial value of the sum calculated next time, and the instantaneous power is continuously accumulated; at time t2, the accumulated sum2 reaches 2 (x) corresponding to the frequency selection value, and the electric energy pulse is enabled to generate and clear the signal, the accumulated sum2 subtracts 2 (x), and the rest value is used as an initial value for calculating the accumulated sum next time, and the instantaneous power is continuously accumulated; at time t3, the input instantaneous power is changed into reverse, the value of the accumulated sum is reduced, and at time t4, the accumulated sum has negative zero crossing and is continuously accumulated; at time t5, the absolute value of the accumulated sum3 reaches 2 (x) corresponding to the frequency selection value, the exclusive OR result of the x-th bit and the (x+1) -th bit of sum3 enables electric energy pulse generation, and an energy clearing signal is generated at the same time, at the moment, a pulse negative direction indication is also given, the accumulated sum3 is added with 2 (x), the rest value is used as an initial value for calculating the accumulated sum next time, and the instantaneous power is continuously accumulated; at time t6, the absolute value of the accumulated sum4 reaches 2 (x) corresponding to the frequency selection value, so that the electric energy pulse generation and energy clearing signals are enabled, a pulse negative direction indication is also given, the accumulated sum4 is added with 2 (x), the rest value is used as an initial value for calculating the accumulated sum next time, and the instantaneous power is continuously accumulated; at time t7, the input instantaneous power becomes forward, the absolute value of the accumulated sum is reduced, and at time t8, the accumulated sum has forward zero crossing and is continuously accumulated; at time t9, the accumulated sum5 reaches 2 (x) corresponding to the frequency selection value, the exclusive OR result of the x-th bit and the (x+1) -th bit of sum5 enables pulse generation and energy clearing signals, at the moment, no pulse negative direction indication is given, the accumulated sum5 subtracts 2 (x), the rest value is used as an initial value for calculating the accumulated sum next time, and the accumulated instantaneous power is continuously accumulated; at time t10, the sum6 reaches 2 (x) corresponding to the frequency selection value, and the electric energy pulse is enabled to generate a sum energy clearing signal, the sum6 subtracts 2 (x), and the remaining value is used as an initial value for calculating the sum next time, and the instantaneous power is continuously accumulated.
The accumulation modes of the power instantaneous values comprise positive accumulation, negative accumulation, positive to negative accumulation and negative to positive accumulation, and all the cases in fig. 3 comprise that the first path of the input instantaneous power is not repeated here.
An electric energy pulse generating apparatus according to this embodiment, as shown in fig. 4, includes: the positive and negative power judging module 301, the first accumulating module 302, the first judging module 303 and the first pulse generating module 304 are sequentially connected, and the second accumulating module 401, the second judging module 402 and the second pulse generating module 403 are sequentially connected.
The positive and negative power judging module 301 is configured to input a path of the instantaneous power, record the path as a first path, judge whether the instantaneous power of the first path is positive power or negative power, if the instantaneous power is positive power, call the first accumulating module 302 to calculate an accumulated sum of instantaneous values of the instantaneous power for calculating energy of the positive power, and if the instantaneous power is negative power, call the first accumulating module 302 to take an absolute value of instantaneous values of the negative power and calculate the accumulated sum of absolute values for calculating energy of absolute values of the negative power.
Specifically, the positive and negative power judging module 301 may include: a symbol detection unit and an absolute value taking unit;
the sign detection unit is used for inputting one path of instantaneous power, marking the path as a first path, detecting whether sign bits of the instantaneous power of the first path are positive or negative, outputting the detected instantaneous power with the sign bit being positive to the first accumulation module if the energy of the positive power is calculated, taking a zero value of the detected instantaneous power with the sign bit being negative and outputting the zero value of the detected instantaneous power to the first accumulation module if the energy of the negative power is calculated, calling the absolute value taking unit to take an absolute value of the detected instantaneous power with the sign bit being negative and outputting the absolute value to the first accumulation module, and taking the detected instantaneous power with the sign bit being positive to the zero value and outputting the zero value of the detected instantaneous power to the first accumulation module;
the first accumulation module includes: a first accumulator and a first accumulation sum register having a clearing function;
the first accumulator is used for accumulating input instantaneous power;
the first accumulation and register is used for storing accumulation results of the first accumulator and receiving a first energy clearing signal.
The first determining module 302 is configured to determine whether an absolute value of the sum of the first paths is greater than or equal to 2 (x), if yes, enable the first pulse generating module 304, if not, disable the first pulse generating module 304, and generate a first energy clearing signal when the first pulse generating module 304 is enabled, and feed back the first energy clearing signal to the first accumulating module 302. The first energy clearing signal is used for subtracting 2 (x) from the absolute value of the accumulation sum of the first path, and taking the rest part as the initial value of the accumulation sum of the first path calculated next time, wherein the rest part is the value of the absolute value remainder of the accumulation sum of the first path after subtracting 2 (x) from the absolute value of the accumulation sum of the first path. When the first accumulation and register receives the first energy clearing signal, the first accumulation and register subtracts 2 (x) from the accumulated accumulation result, and takes the rest part as the initial value of the accumulation and sum of the first path calculated by the first accumulator next time.
The first pulse generation module 304 is configured to enable generation of a power pulse with an x-th bit of the accumulated sum of the first paths. Wherein the accumulation sum of the first path adopts binary counting, and the generation of the power pulse by using the x-th bit of the accumulation sum of the first path comprises the following steps: and judging whether the x bit of the accumulated sum of the first path is valid (namely 1 or 0), if so (namely 1), generating a power pulse, and if not (namely 0), not generating the power pulse.
Specifically, the first pulse generating module may include: a first bit detection unit and a first pulse generator;
the first bit detection unit is configured to detect whether an xth bit of the accumulated sum of the first path is valid (i.e. 1 or 0), and enable the first pulse generator to generate a power pulse when the xth bit is valid (i.e. 1).
The second accumulation module 401 is configured to input another path of the instantaneous power, denoted as a second path, and calculate an accumulated sum of instantaneous values or an accumulated sum of absolute values of the instantaneous power of the second path, so as to calculate energy of the accumulated sum of the instantaneous power or energy of the accumulated sum of the absolute values.
Specifically, the second accumulating module may include: a second accumulator and register having a clear function;
the second accumulator is used for accumulating the input instantaneous value of the instantaneous power or the absolute value of the instantaneous value, namely the instantaneous power of the second path;
the second accumulation and register is used for storing the accumulation result of the second accumulator and receiving a second energy clearing signal.
The second determining module 402 is configured to determine whether the absolute value of the sum of the second paths is greater than or equal to 2 (x), if yes, enable the second pulse generating module 403, if not, disable the second pulse generating module 403, and generate a second energy clearing signal when the second pulse generating module 403 is enabled, and feed back the second energy clearing signal to the second accumulating module 401. The second energy clearing signal is used for subtracting 2 x from the absolute value of the accumulation sum of the second path, and taking the rest part as the initial value of the accumulation sum of the second path calculated next time, wherein the rest part is the value of the absolute value remainder of the accumulation sum of the second path after subtracting 2 x from the absolute value of the accumulation sum of the second path. When the second accumulation and register receives the second energy clearing signal, the second accumulation and register subtracts 2 (x) from the accumulated accumulation result, and takes the rest part as the initial value of the accumulation and of the second path calculated by the second accumulator next time.
The second pulse generating module 403 is configured to enable generation of a power pulse by using an exclusive or result of an x-th bit and an (x+1) -th bit of the accumulated sum of the second path. Wherein the accumulation sum of the second path adopts binary counting, and the enabling of the generation of the electric energy pulse by using the exclusive OR result of the x bit and the (x+1) bit of the accumulation sum of the second path comprises: and judging whether the exclusive OR result of the x bit and the (x+1) bit of the accumulated sum of the second path is valid (namely 1 or 0), if so (namely 1), generating an electric energy pulse, and if not (namely 0), not generating the electric energy pulse.
Specifically, the second pulse generating module may include: an exclusive-or gate, a second detection unit, and a second pulse generator;
the exclusive OR gate is used for exclusive-or of the x bit and the (x+1) bit of the accumulated sum of the second path;
the second detection unit is used for detecting whether the exclusive or result of the exclusive or gate is valid or not, and enabling the second pulse generator to generate the electric energy pulse when the exclusive or result is valid.
Wherein the frequency selection value may be set by a user, and is used to adjust the output frequency of the electric energy pulses generated by the first pulse generating module 304 and the second pulse generating module 403, that is, the output frequency of the electric energy pulses generated by the first pulse generating module 304 is equal to the frequency selection value, and the output frequency of the electric energy pulses generated by the second pulse generating module 403 is equal to the frequency selection value;
in order to adapt to different application environments, under the same input signal, different frequency selection values select to output electric energy pulses with different output frequencies;
and x is a positive integer and corresponds to the frequency selection value, when the frequency selection values are different, the value of x is different, the higher the frequency selection value is, namely the faster the required electric energy pulse is output, the smaller the value of x is, the frequency selection value is doubled when the value of x is reduced by 1, and a user can automatically set the value of x by combining the frequency selection values according to own needs.
The electric energy pulse generation method and the electric energy pulse generation device adopt a simpler algorithm and a simpler structure, so that the energy is not lost in the whole accumulation process, and the accuracy of measurement is ensured.
While specific embodiments of the invention have been described above, it will be appreciated by those skilled in the art that these are by way of example only, and the scope of the invention is defined by the appended claims. Various changes and modifications to these embodiments may be made by those skilled in the art without departing from the principles and spirit of the invention, but such changes and modifications fall within the scope of the invention.

Claims (12)

1. A method of generating pulses of electrical energy, comprising the steps of:
S 1 dividing the input instantaneous power into a first path and a second path, and executing S for the first path 11 Execute S for the second path 12
S 11 Judging whether the instantaneous power is positive power or negative power, if the instantaneous power is positive power, calculating the accumulated sum of instantaneous values of the instantaneous power to be used for calculating the energy of the positive power, and if the instantaneous power is negative power, taking the absolute value of the instantaneous values of the negative power and calculating the accumulated sum of the absolute values to be used for calculating the energy of the absolute values of the negative power;
S 12 calculating an accumulated sum of instantaneous values of the instantaneous power or an accumulated sum of absolute values of the instantaneous values for calculating an energy of the accumulated sum of instantaneous power or an energy of the accumulated sum of absolute values;
S 2 the method comprises the steps of respectively judging the accumulation sum of a first path and the accumulation sum of a second path according to a frequency selection value, enabling or disabling a first pulse generation module based on the judgment result of the first path, and enabling or disabling a second pulse generation module based on the judgment result of the second path;
S 3 if the first pulse generating module is enabled, generating an electric energy pulse and a first energy clearing signal, and if the second pulse generating module is enabled, generating an electric energy pulse and a second energy clearing signal;
the frequency selection value is used for adjusting the output frequency of the electric energy pulse generated by the first pulse generation module and the second pulse generation module.
2. The power pulse generating method as claimed in claim 1, wherein S 2 Comprising the following steps:
judging whether the absolute value of the accumulated sum of the first path is larger than or equal to 2 (x), if so, enabling the first pulse generation module, otherwise, not enabling the first pulse generation module;
judging whether the absolute value of the accumulated sum of the second paths is larger than or equal to 2 (x), if so, enabling the second pulse generation module, and if not, enabling the second pulse generation module;
x is a positive integer and corresponds to the frequency selection value.
3. The power pulse generating method as claimed in claim 2, wherein said first path of accumulated sum and said second path of accumulated sum each use binary count, S 3 Comprising the following steps:
if the first pulse generating module is enabled, enabling electric energy pulse generation and generation of the first energy clearing signal by using the x bit of the accumulated sum of the first paths;
if the second pulse generation module is enabled, the power pulse generation and the second energy clearing signal are enabled by the exclusive OR result of the x bit and the (x+1) bit of the accumulated sum of the second path.
4. A method of generating power pulses according to claim 3, wherein enabling power pulse generation with the x-th bit of the accumulated sum of the first paths comprises: judging whether the x bit of the accumulated sum of the first path is valid, if so, generating an electric energy pulse, and if not, not generating the electric energy pulse;
enabling power pulse generation with an exclusive or result of an x-th bit and an (x+1) -th bit of the accumulated sum of the second way includes: and judging whether an exclusive OR result of the x bit and the (x+1) bit of the accumulated sum of the second path is effective, if so, generating an electric energy pulse, and if not, not generating the electric energy pulse.
5. A method of generating a pulse of electrical energy as claimed in claim 1 or 3, wherein the first energy scavenging signal is used to subtract 2 (x) from the absolute value of the accumulated sum of the first path and take the remaining part as the initial value for the next calculation of the accumulated sum of the first path;
the second energy-scavenging signal is used to subtract 2 x from the absolute value of the second path's accumulated sum and take the remaining portion as the initial value for the next calculation of the second path's accumulated sum.
6. An electrical energy pulse generating device, comprising: the device comprises a positive and negative power judging module, a first accumulating module, a first judging module and a first pulse generating module which are sequentially connected, and a second accumulating module, a second judging module and a second pulse generating module which are sequentially connected;
the positive and negative power judging module is used for inputting one path of instantaneous power, marking the path as a first path, judging whether the instantaneous power of the first path is positive power or negative power, if the instantaneous power is positive power, calling the first accumulating module to calculate the accumulated sum of instantaneous values of the instantaneous power so as to be used for calculating the energy of the positive power, and if the instantaneous power is negative power, calling the first accumulating module to take the absolute value of the instantaneous values of the negative power and calculate the accumulated sum of the absolute value so as to be used for calculating the energy of the absolute value of the negative power;
the first judging module is used for judging the accumulation sum of the first paths according to the frequency selection value, enabling or disabling the first pulse generating module based on the judging result of the first paths, generating a first energy clearing signal when the first pulse generating module is enabled, and feeding back the first energy clearing signal to the first accumulation module;
the first pulse generation module is used for generating electric energy pulses;
the second accumulation module is used for inputting the other path of the instantaneous power, recording the other path as a second path, and calculating the accumulation sum of instantaneous values or the accumulation sum of absolute values of the instantaneous values of the second path so as to be used for calculating the energy of the accumulation sum of the instantaneous power or the energy of the accumulation sum of the absolute values;
the second judging module is used for judging the accumulation sum of the second path according to the frequency selection value, enabling or disabling the second pulse generating module based on the judging result of the second path, generating a second energy clearing signal when the second pulse generating module is enabled, and feeding back the second energy clearing signal to the second accumulation module;
the second pulse generation module is used for generating electric energy pulses;
the frequency selection value is used to adjust the output frequency of the electrical energy pulses generated by the first pulse generation module and the second pulse.
7. The power pulse generating device according to claim 6, wherein the first determining module is further configured to determine whether an absolute value of the accumulated sum of the first paths is greater than or equal to 2 (x), if yes, enable the first pulse generating module, and if not, disable the first pulse generating module;
the second judging module is further configured to judge whether an absolute value of the accumulated sum of the second path is greater than or equal to 2 (x), if yes, enable the second pulse generating module, and if not, disable the second pulse generating module;
x is a positive integer and corresponds to the frequency selection value.
8. The power pulse generating device of claim 7, wherein the accumulated sums of the first and second paths each employ binary counts;
the first pulse generation module is used for enabling electric energy pulse generation by using the x-th bit of the accumulated sum of the first paths;
the second pulse generation module is used for enabling the generation of the electric energy pulse by using the exclusive OR result of the x bit and the (x+1) bit of the accumulated sum of the second path.
9. The power pulse generating device of claim 8, wherein enabling power pulse generation with the x-th bit of the accumulated sum of the first paths comprises: judging whether the x bit of the accumulated sum of the first path is valid, if so, generating an electric energy pulse, and if not, not generating the electric energy pulse;
enabling power pulse generation with an exclusive or result of an x-th bit and an (x+1) -th bit of the accumulated sum of the second way includes: and judging whether an exclusive OR result of the x bit and the (x+1) bit of the accumulated sum of the second path is effective, if so, generating an electric energy pulse, and if not, not generating the electric energy pulse.
10. The power pulse generating device according to claim 6 or 8, wherein the first energy clearing signal is configured to subtract 2 (x) from an absolute value of an accumulated sum of the first path, and use a remaining portion as an initial value for next calculation of the accumulated sum of the first path;
the second energy-scavenging signal is used to subtract 2 x from the absolute value of the second path's accumulated sum and take the remaining portion as the initial value for the next calculation of the second path's accumulated sum.
11. The power pulse generating device according to claim 6, wherein the positive and negative power judging module comprises: a symbol detection unit and an absolute value taking unit;
the sign detection unit is used for inputting one path of instantaneous power, marking the path as a first path, detecting whether sign bits of the instantaneous power of the first path are positive or negative, outputting the detected instantaneous power with the sign bit being positive to the first accumulation module if the energy of the positive power is calculated, taking a zero value of the detected instantaneous power with the sign bit being negative and outputting the zero value of the detected instantaneous power to the first accumulation module if the energy of the negative power is calculated, calling the absolute value taking unit to take an absolute value of the detected instantaneous power with the sign bit being negative and outputting the absolute value to the first accumulation module, and taking the detected instantaneous power with the sign bit being positive to the zero value and outputting the zero value of the detected instantaneous power to the first accumulation module;
the first accumulation module includes: a first accumulator and a first accumulation sum register having a clearing function;
the first accumulator is used for accumulating input instantaneous power;
the first accumulation and register is used for storing the accumulation result of the first accumulator and receiving the first energy clearing signal;
the second accumulation module includes: a second accumulator and register having a clear function;
the second accumulator is used for accumulating the instantaneous value of the input instantaneous power or the absolute value of the instantaneous value;
the second accumulation and register is used for storing the accumulation result of the second accumulator and receiving the second energy clearing signal.
12. The power pulse generating device of claim 9, wherein the first pulse generating module comprises: a first bit detection unit and a first pulse generator;
the first bit detection unit is used for detecting whether the x bit of the accumulation sum of the first path is valid or not, and enabling the first pulse generator to generate electric energy pulses when the x bit is valid;
the second pulse generation module includes: an exclusive-or gate, a second detection unit, and a second pulse generator;
the exclusive OR gate is used for exclusive-or of the x bit and the (x+1) bit of the accumulated sum of the second path;
the second detection unit is used for detecting whether the exclusive or result of the exclusive or gate is valid or not, and enabling the second pulse generator to generate the electric energy pulse when the exclusive or result is valid.
CN201610364873.XA 2016-05-27 2016-05-27 Method and device for generating electric energy pulse Active CN107436380B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610364873.XA CN107436380B (en) 2016-05-27 2016-05-27 Method and device for generating electric energy pulse

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610364873.XA CN107436380B (en) 2016-05-27 2016-05-27 Method and device for generating electric energy pulse

Publications (2)

Publication Number Publication Date
CN107436380A CN107436380A (en) 2017-12-05
CN107436380B true CN107436380B (en) 2023-12-15

Family

ID=60454441

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610364873.XA Active CN107436380B (en) 2016-05-27 2016-05-27 Method and device for generating electric energy pulse

Country Status (1)

Country Link
CN (1) CN107436380B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116593768B (en) * 2023-04-27 2024-03-26 深圳市锐能微科技有限公司 Electric energy metering method and device, electronic equipment and medium
CN116338302A (en) * 2023-04-27 2023-06-27 深圳市锐能微科技有限公司 Electric energy metering method and device, electronic equipment and medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11211762A (en) * 1998-01-20 1999-08-06 Mitsubishi Electric Corp Method and device for bi-directional electric energy metering
CN1952678A (en) * 2006-11-30 2007-04-25 北京中星微电子有限公司 Verification system of electric energy measurement chip
CN102200544A (en) * 2010-12-31 2011-09-28 中国电力科学研究院 Method for accumulating aggregate capacitances of smart meter capable of realizing bidirectional metering
WO2013009528A2 (en) * 2011-07-08 2013-01-17 General Electric Company System and method for use in electric power distribution systems
CN104237632A (en) * 2014-09-28 2014-12-24 南方电网科学研究院有限责任公司 Real-time bidirectional independent electric-energy metering system
CN205910258U (en) * 2016-05-27 2017-01-25 上海贝岭股份有限公司 Electric energy pulse produces device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10031166B2 (en) * 2013-09-30 2018-07-24 Lynary Enterprises Inc. Electrical current measuring apparatus and method

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH11211762A (en) * 1998-01-20 1999-08-06 Mitsubishi Electric Corp Method and device for bi-directional electric energy metering
CN1952678A (en) * 2006-11-30 2007-04-25 北京中星微电子有限公司 Verification system of electric energy measurement chip
CN102200544A (en) * 2010-12-31 2011-09-28 中国电力科学研究院 Method for accumulating aggregate capacitances of smart meter capable of realizing bidirectional metering
WO2013009528A2 (en) * 2011-07-08 2013-01-17 General Electric Company System and method for use in electric power distribution systems
CN104237632A (en) * 2014-09-28 2014-12-24 南方电网科学研究院有限责任公司 Real-time bidirectional independent electric-energy metering system
CN205910258U (en) * 2016-05-27 2017-01-25 上海贝岭股份有限公司 Electric energy pulse produces device

Also Published As

Publication number Publication date
CN107436380A (en) 2017-12-05

Similar Documents

Publication Publication Date Title
KR101952798B1 (en) Detection distance calibration method, apparatus, and device
CN107436380B (en) Method and device for generating electric energy pulse
SE519631C2 (en) Synchronous CDMA acquisition circuit
US20170207909A1 (en) Correlation determination early termination
CN102759530B (en) A kind of surface quality image on-line measuring device
CN102546084B (en) Anti-interference error-correcting and sampling system and method in process of receiving asynchronous serial communication data
CN203376701U (en) Touch screen control system and signal processing circuit thereof
JPWO2021026241A5 (en)
CN106527099A (en) Time-to-digital converter (TDC) and time measurement circuit and method thereof
CN106603099A (en) Single-bit receiver signal detection method based on probability calculations
CN110595529B (en) Method for rapidly detecting weak periodic signals under strong background noise
CN100508395C (en) Plus-minus counting circuit and plus-minus counting method
TWI575896B (en) Signal Detection Method and Device
US20170059718A1 (en) Signal processing device and radiation measurement device
CN108768637B (en) Quantum key distribution interference ring intermittent phase compensation control method and system
CN101644744A (en) Adjustment comparison method of test vectors
CN105786444A (en) Detection method and apparatus for leading zeros in mantissas of floating-point number
CN1191683C (en) Method and device for inspecting signals received from channel signals
CN203101466U (en) Electric energy measuring creeping control circuit
CN105573553A (en) Information processing method, information processing device and electronic equipment
CN106953630A (en) For mercury ion Microwave Frequency target high-speed pulse signal-count devices and methods therefor
CN205910258U (en) Electric energy pulse produces device
WO2019174263A1 (en) Multi-addend addition circuit for stochastic calculus
CN105278914B (en) Configurable floating point vector norm based on FPGA solves IP kernel
RU2614203C1 (en) Measuring device for speed counting of distributed in time impulses

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant