CN111596228B - Electric leakage detection method and device - Google Patents
Electric leakage detection method and device Download PDFInfo
- Publication number
- CN111596228B CN111596228B CN202010723410.4A CN202010723410A CN111596228B CN 111596228 B CN111596228 B CN 111596228B CN 202010723410 A CN202010723410 A CN 202010723410A CN 111596228 B CN111596228 B CN 111596228B
- Authority
- CN
- China
- Prior art keywords
- value
- sampling
- data
- sequence
- sampling data
- 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
Links
- 238000001514 detection method Methods 0.000 title claims abstract description 52
- 238000005070 sampling Methods 0.000 claims abstract description 272
- 238000000034 method Methods 0.000 claims abstract description 33
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 31
- 238000004364 calculation method Methods 0.000 claims description 17
- 238000006243 chemical reaction Methods 0.000 claims description 8
- 238000004590 computer program Methods 0.000 claims description 5
- 230000010076 replication Effects 0.000 claims description 2
- 239000011248 coating agent Substances 0.000 claims 2
- 238000000576 coating method Methods 0.000 claims 2
- 239000000758 substrate Substances 0.000 claims 1
- 230000009286 beneficial effect Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 238000006467 substitution reaction Methods 0.000 description 2
- 241000764238 Isis Species 0.000 description 1
- 241000255777 Lepidoptera Species 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R31/00—Arrangements for testing electric properties; Arrangements for locating electric faults; Arrangements for electrical testing characterised by what is being tested not provided for elsewhere
- G01R31/50—Testing of electric apparatus, lines, cables or components for short-circuits, continuity, leakage current or incorrect line connections
- G01R31/52—Testing for short-circuits, leakage current or ground faults
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01R—MEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
- G01R19/00—Arrangements for measuring currents or voltages or for indicating presence or sign thereof
- G01R19/02—Measuring effective values, i.e. root-mean-square values
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F17/00—Digital computing or data processing equipment or methods, specially adapted for specific functions
- G06F17/10—Complex mathematical operations
- G06F17/14—Fourier, Walsh or analogous domain transformations, e.g. Laplace, Hilbert, Karhunen-Loeve, transforms
- G06F17/141—Discrete Fourier transforms
- G06F17/142—Fast Fourier transforms, e.g. using a Cooley-Tukey type algorithm
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Engineering & Computer Science (AREA)
- Computational Mathematics (AREA)
- Mathematical Analysis (AREA)
- Mathematical Optimization (AREA)
- Pure & Applied Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Theoretical Computer Science (AREA)
- Discrete Mathematics (AREA)
- Algebra (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- General Engineering & Computer Science (AREA)
- Testing Of Short-Circuits, Discontinuities, Leakage, Or Incorrect Line Connections (AREA)
Abstract
The invention discloses a leakage detection method and device, and relates to the technical field of leakage detection. The method comprises the following steps: collecting a sampling sequence belonging to a power grid period, wherein the sampling sequence consists of N sampling data including a position value and a sampling value; processing each sampling data in the sampling sequence by adopting an index copying mode, converting an original coding value in a position value in the sampling data into a reverse coding value, and updating the sampling sequence and the sampling data in the sampling sequence; respectively calculating a twiddle factor corresponding to each sampling data based on the updated sampling sequence; taking the updated sampling data and the corresponding twiddle factors as input, and calculating leakage waveform values corresponding to the sampling data one by adopting a butterfly algorithm; and calculating a leakage current effective value according to the leakage current value of the leakage waveform value, and outputting a leakage current detection result. The device is applied with the method provided by the scheme.
Description
Technical Field
The invention relates to the technical field of electric leakage detection, in particular to an electric leakage detection method and device.
Background
The application scene of leakage detection is various, like the in-process that electric automobile charges, need consider two kinds of electric leakage circumstances usually to alternating-current charging stake: firstly, the threat of alternating current leakage to the personal safety of a user is prevented; and secondly, the direct current leakage caused by the fact that the automobile battery is connected to a main power supply is prevented, so that the quality of a power grid is influenced, and even the loss of a charging device is damaged.
The existing leakage detection scheme has a true effective value detection algorithm and an FFT detection algorithm, the true effective value detection algorithm has the defect that the leakage waveform cannot be accurately identified, the FFT detection algorithm has high dependence on hardware resources, and the requirement of national standard on the leakage detection performance can be met by combining a DSP or an MCU supporting floating point operation.
Disclosure of Invention
The invention aims to provide a leakage current detection method and a leakage current detection device, which can accurately detect the effective value of leakage current.
In order to achieve the above object, a first aspect of the present invention provides a leakage detecting method including:
collecting a sampling sequence belonging to a power grid period, wherein the sampling sequence consists of N sampling data comprising a position value and a sampling value;
processing each sampling data in the sampling sequence by adopting an index replication mode, converting an original code value in a position value in the sampling data into an inverted code value, and updating the sampling sequence and the sampling data in the sampling sequence;
respectively calculating a twiddle factor corresponding to each sampling data based on the updated sampling sequence;
taking the updated sampling data and the corresponding twiddle factors as input, and calculating leakage waveform values corresponding to the sampling data one to one by adopting a butterfly algorithm;
and calculating a leakage current effective value according to the leakage current value of the leakage waveform value, and outputting a leakage current detection result.
Preferably, the method for collecting the sampling sequence belonging to one grid cycle comprises the following steps:
collecting a leakage current sequence belonging to a power grid period;
and converting the collected leakage current sequence into a sampling sequence through a conversion formula of a leakage current value and a sampling value, wherein the leakage current sequence consists of N leakage current data including a position value and a leakage current value.
Preferably, the method for processing each of the sample data in the sample sequence by using index copy, converting an original code value in a position value in the sample data into an inverted code value, and updating the sample sequence and the sample data therein includes:
respectively converting the original coding value in each sampling data position value in the sampling sequence into a binary value with the same number of bits as the reference by taking the binary bit number of the original coding value corresponding to the Nth sampling data position value as the reference;
copying the binary value reverse code index to obtain N reverse code values corresponding to the original code values one by one, and taking the decimal value of the reverse code values as an index of the corresponding sampling data position value;
and matching sampling values of position values corresponding to the original coding values according to the indexes of the position values of the sampling data, and updating the sampling sequence and the sampling data in the sampling sequence.
Further, the method for updating the sampling sequence and the sampling data therein comprises the following steps:
matching a sampling value corresponding to the code reversing code value in each position value based on the index relationship between the code reversing code value and the original code value in the position values of the sampling data so as to update the sampling data to which each position value belongs;
and updating the sampling sequence until the sampling data are updated.
Preferably, the method for calculating the leakage waveform value corresponding to the sampling data one by using a butterfly algorithm includes:
s1, based on the number N of the sampling data in the sampling sequence, using the formulaCalculating the total operation series D of the butterfly algorithm, and expressing the D-th level butterfly operation by D;
S2, grouping the N sampling data in the updated sampling sequence pairwise according to the serial number of the position value, and the position space value corresponding to the sampling data in each group ismSaidm=;
S3, using the formulaPerforming a d-th butterfly operation on the first sampled data in each of the groups by using a formulaPerforming a d-th stage butterfly operation on the second sample data in each of the packets, wherein,,;
said formulaMiddle, right of equationAs input to the formula in the d-th butterfly operation, left of the equationAs the output of the formula in the d-th stage butterfly operationMiddle, right of equationAs input to the formula in the d-th butterfly operation, left of the equationAs the output of the formula in the d-th stage butterfly operation, the initial value of d is 0, and the right side of the equationIs a position value ofnThe sampling value corresponding to the sampling data;
s4, determining whether d is equal to 0, if so, outputting the d-th stage butterfly operationAndrounding, using the rounding result as the input of the next-stage butterfly operation, making D = D +1, re-executing step S2, and if D is greater than 0 and D is less than D-1, outputting the D-th-stage butterfly operationAndrespectively reducing by 10000 times, rounding, taking the rounding result as the input of the next-stage butterfly operation, making D = D +1, executing step S2 again, if D is equal to D-1, directly outputting the D-th-stage butterfly operationRespectively reducing by 10000 times and then rounding to obtain the leakage waveform value of the corresponding sampling data;
s5, summarizing leakage waveform values corresponding to the N sampling data in the sampling sequence one by oneX。
Preferably, the method for calculating the rotation factor corresponding to each of the sample data respectively based on the updated sample sequence includes:
wherein,indicating a position value ofThe rotation factor corresponding to the sampled data of, theIndicating a position value ofThe real part of the twiddle factor corresponding to the sampled data of (a),indicating a position value ofThe imaginary part of the corresponding twiddle factor of the sampled data.
Further, the method for calculating the effective value of the leakage current according to the leakage waveform value and the leakage current value comprises the following steps:
Ka conversion coefficient representing the leakage current value and the sampling value;
and when the effective value of the leakage current is larger than the threshold value, outputting the detection result of the leakage current as the leakage current, otherwise, outputting the detection result of the leakage current as the non-leakage current.
Compared with the prior art, the electric leakage detection method provided by the invention has the following beneficial effects:
in the electric leakage detection method provided by the invention, firstly, a sampling period is set according to the power grid frequency to ensure that a complete sampling sequence in a power grid period can be acquired, the sampling sequence comprises N sampling data including position values and sampling values, each sampling data in the sampling sequence is processed in an indexing copy mode for improving algorithm performance, an original coding value in the position value of the sampling data is converted into an inverted coding value to realize the updating of the sampling sequence and the sampling data therein, then, a rotation factor corresponding to each sampling data is calculated based on the updated sampling sequence, an electric leakage waveform value corresponding to each sampling data is calculated based on the sampling data and the corresponding rotation factor by a butterfly algorithm, and finally, an electric leakage effective value is calculated based on the electric leakage waveform value and an electric leakage detection result is output.
Therefore, the leakage current waveform value corresponding to the sampling data is calculated by adopting the butterfly algorithm after the indexing and copying, so that the accuracy of the effective value result of the leakage current can be ensured while the performance of the algorithm is improved.
A second aspect of the present invention provides a leakage detecting system, which is applied to the leakage detecting system method in the above technical solution, and the system includes:
the system comprises a data acquisition unit, a data processing unit and a data processing unit, wherein the data acquisition unit is used for acquiring a sampling sequence belonging to a power grid period, and the sampling sequence consists of N sampling data comprising position values and sampling values;
the data processing unit is used for processing each sampling data in the sampling sequence in an index copy mode, converting an original coding value in the position value of the sampling data into a reverse coding value, and updating the sampling sequence and the sampling data in the sampling sequence;
a twiddle factor calculation unit for calculating twiddle factors corresponding to each of the sampled data based on the updated sampling sequence, respectively;
the leakage waveform calculation unit is used for taking the updated sampling data and the corresponding twiddle factors as input and calculating leakage waveform values corresponding to the sampling data one by adopting a butterfly algorithm;
and the result output unit is used for calculating the effective leakage current value according to the leakage current value of the leakage waveform value and outputting a leakage detection result.
Compared with the prior art, the beneficial effects of the electric leakage detection system provided by the invention are the same as those of the electric leakage detection method provided by the technical scheme, and are not repeated herein.
A third aspect of the present invention provides a computer-readable storage medium having a computer program stored thereon, the computer program, when executed by a processor, performing the steps of the above-mentioned leakage detection method.
Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the invention are the same as those of the electric leakage detection method provided by the technical scheme, and are not repeated herein.
Drawings
The accompanying drawings, which are included to provide a further understanding of the invention and are incorporated in and constitute a part of this specification, illustrate embodiments of the invention and together with the description serve to explain the invention and not to limit the invention. In the drawings:
fig. 1 is a schematic flow chart of a leakage detection method according to an embodiment of the invention;
FIG. 2 is a diagram illustrating an exemplary sequence of leakage currents in a grid cycle according to a first embodiment of the present invention;
FIG. 3 is a diagram illustrating an exemplary butterfly operation according to an embodiment of the invention;
fig. 4 is a block diagram of a leakage detection system according to a second embodiment of the present invention.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present invention comprehensible, embodiments accompanied with figures are described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Referring to fig. 1, the present embodiment provides a leakage detection method, including:
collecting a sampling sequence belonging to a power grid period, wherein the sampling sequence consists of N sampling data including a position value and a sampling value; processing each sampling data in the sampling sequence by adopting an index copying mode, converting an original code value in a sampling data position value into a code reversing code value, and updating the sampling sequence and the sampling data in the sampling sequence; respectively calculating a twiddle factor corresponding to each sampling data based on the updated sampling sequence; taking the updated sampling data and the corresponding twiddle factors as input, and calculating leakage waveform values corresponding to the sampling data one by adopting a butterfly algorithm; and calculating a leakage current effective value according to the leakage current value of the leakage waveform value, and outputting a leakage current detection result.
In the leakage detection method provided by this embodiment, a sampling period needs to be set according to a power grid frequency to ensure that a complete sampling sequence in a power grid period can be acquired, the sampling sequence is composed of N sampling data including position values and sampling values, each sampling data in the sampling sequence is processed by adopting an index copy mode to improve algorithm performance, an original coding value in the position value of the sampling data is converted into an inverted coding value, updating of the sampling sequence and the sampling data therein is achieved, then a rotation factor corresponding to each sampling data is calculated based on the updated sampling sequence, a leakage waveform value corresponding to each sampling data is calculated based on the sampling data and the corresponding rotation factor by adopting a butterfly algorithm, a leakage current effective value is calculated based on the leakage waveform value, and a leakage detection result is output.
Therefore, in the embodiment, the leakage current waveform value corresponding to the sampling data is calculated by adopting the butterfly algorithm after the indexing and copying, so that the accuracy of the effective value result of the leakage current can be ensured while the performance of the algorithm is improved. In addition, because the butterfly algorithm has the characteristic of high calculation efficiency, when a program containing the butterfly algorithm runs, the calculation performance can be greatly improved on the premise of meeting the requirement of the national standard on the accuracy of leakage detection, so that the algorithm can meet the requirement of the national standard on the leakage detection performance under the condition of no support of a DSP (digital signal processor) and floating point hardware.
Referring to fig. 2, the method for collecting the sampling sequence belonging to one grid cycle in the above embodiment includes:
collecting a leakage current sequence belonging to a power grid period; and converting the collected leakage current sequence into a sampling sequence through a conversion formula of a leakage current value and a sampling value, wherein the leakage current sequence consists of N leakage current data including a position value and a leakage current value.
Illustratively, the conversion formula isWhereina conversion coefficient representing the leakage current value and the sampling value is a constant parameter, the value of the constant parameter is related to the equipment parameter of the leakage current detection unit (RCMU),indicating a position value ofnThe value of the leakage current of (a),indicating a position value ofnOf the sampling value(s).
During specific implementation, firstly, a leakage current sequence comprising N leakage current signals is acquired through a leakage detection unit (RCMU), the leakage current sequence is converted into a voltage signal of sampling data and then is sent to an ADC acquisition terminal of the MCU, a program running on the MCU updates the sampling sequence and the sampling data therein after being processed in an indexing copy mode according to the sampling sequence, then a rotation factor and a leakage waveform value corresponding to each sampling data are respectively calculated, a leakage current effective value is finally obtained, and a leakage detection result is output.
It should be noted that the grid cycle is related to the grid frequency, and if the grid frequency is 50HZ, the corresponding grid cycle is 20ms, it is usually required to ensure that 32 sampling data are collected in each grid cycle as a sampling sequence, and certainly, the value of N may be adaptively adjusted according to the precision and performance requirements, but the premise is that the value of N is a power of 2.
In the above embodiment, the method for processing each sample data in the sample sequence by using index copy, converting an original code value in a position value in the sample data into an inverse code value, and updating the sample sequence and the sample data therein includes:
respectively converting the original coding value in each sampling data position value in the sampling sequence into a binary value with the same number of bits as the reference by taking the binary bit number of the original coding value corresponding to the Nth sampling data position value as the reference; copying the binary value reverse code index to obtain N reverse code values corresponding to the original code values one by one, and taking the decimal value of the reverse code value as an index of the corresponding sampling data position value; and matching sampling values of position values corresponding to the original coding values according to the indexes of the position values of the sampling data, and updating the sampling sequence and the sampling data in the sampling sequence.
In specific implementation, in order to reduce the number of times of copying sample data and further improve data processing performance, in this embodiment, each sample data in a sample sequence is processed in an indexed copy manner, and the processing logic of indexed copy is:
firstly, acquiring a binary maximum digit of a position value corresponding to an original coding value in sampling data, generally taking the binary digit of the original coding value of the Nth sampling data as a reference, respectively converting the original coding value in each sampling data position value in a sampling sequence into a binary value with the same digit as the reference digit, then inversely copying each original coding binary value to obtain an inverse coding value in one-to-one correspondence, and finally taking a decimal value of the inverse coding value as an index of the corresponding sampling data position value and matching the corresponding sampling value to realize the updating of the sampling sequence and the sampling data therein. Taking a sample sequence including 32 sample data as an example, the update process is explained as follows:
position value | Sampling value | Originally encoding the corresponding binary values | Binary value corresponding to reverse code coding | Position value index |
0 | x(0) | 00000 | 00000 | 0 |
1 | x(1) | 00001 | 10000 | 16 |
2 | x(2) | 00010 | 01000 | 8 |
3 | x(3) | 00011 | 11000 | 24 |
4 | x(4) | 00100 | 00100 | 4 |
5 | x(5) | 00101 | 10100 | 20 |
6 | x(6) | 00110 | 01100 | 12 |
7 | x(7) | 00111 | 11100 | 28 |
8 | x(8) | 01000 | 00010 | 2 |
9 | x(9) | 01001 | 10010 | 18 |
10 | x(10) | 01010 | 01010 | 10 |
11 | x(11) | 01011 | 11010 | 26 |
12 | x(12) | 01100 | 00110 | 6 |
13 | x(13) | 01101 | 10110 | 22 |
14 | x(14) | 01110 | 01110 | 14 |
15 | x(15) | 01111 | 11110 | 30 |
16 | x(16) | 10000 | 00001 | 1 |
17 | x(17) | 10001 | 10001 | 17 |
18 | x(18) | 10010 | 01001 | 9 |
19 | x(19) | 10011 | 11001 | 25 |
20 | x(20) | 10100 | 00101 | 5 |
21 | x(21) | 10101 | 10101 | 21 |
22 | x(22) | 10110 | 01101 | 13 |
23 | x(23) | 10111 | 11101 | 29 |
24 | x(24) | 11000 | 00011 | 3 |
25 | x(25) | 11001 | 10011 | 19 |
26 | x(26) | 11010 | 01011 | 11 |
27 | x(27) | 11011 | 11011 | 27 |
28 | x(28) | 11100 | 00111 | 7 |
29 | x(29) | 11101 | 10111 | 23 |
30 | x(30) | 11110 | 01111 | 15 |
31 | x(31) | 11111 | 11111 | 31 |
In the above embodiment, the method for updating the sample sequence and the sample data therein includes:
matching a sampling value corresponding to the code reversing code value in each position value based on the index relationship between the code reversing code value and the original code value in the position values of the sampling data so as to update the sampling data to which each position value belongs; and updating the sampling sequence until the updating of each sampling data is finished.
For example, when calculating sample data with a position value of 2, the sample value with an original position value of 16 can be matched by the index value of 16, and data calculation is performed by using the sample value.
In the above embodiment, the method for calculating the leakage waveform value corresponding to the sampling data one to one by using the butterfly algorithm includes:
s1, based on the number N of the sampling data in the sampling sequence, using the formulaCalculating the total operation series D of the butterfly algorithm, and expressing the D-th level butterfly operation by D;
S2, grouping the N sampling data in the updated sampling sequence pairwise according to the serial number of the position value, and the position space value corresponding to the sampling data in each group ismSaidm=;
S3, using the formulaPerforming a d-th butterfly operation on the first sampled data in each of the groups by using a formulaPerforming a d-th stage butterfly operation on the second sample data in each of the packets, wherein,,;
said formulaMiddle, right of equationAs input to the formula in the d-th butterfly operation, left of the equationAs the output of the formula in the d-th stage butterfly operationMiddle, right of equationAs input to the formula in the d-th butterfly operation, left of the equationAs the output of the formula in the d-th stage butterfly operation, the initial value of d is 0, and the right side of the equationIs a position value ofnThe sampling value corresponding to the sampling data;
s4, determining whether d is equal to 0, if so, outputting the d-th stage butterfly operationAndrespectively rounding, taking the rounding result as the input of the next-stage butterfly operation, making D = D +1, re-executing the step S2, and if D is greater than 0 and D is less than D-1, outputting the D-th-stage butterfly operationAndrespectively reducing by 10000 times, rounding, taking the rounding result as the input of the next-stage butterfly operation, making D = D +1, executing step S2 again, if D is equal to D-1, directly outputting the D-th-stage butterfly operationAndrespectively reducing by 10000 times and then rounding to obtain the leakage waveform value of the corresponding sampling data;
s5, summarizing leakage waveform values corresponding to the N sampling data in the sampling sequence one by oneX。
As shown in fig. 3, a specific procedure of the butterfly operation is exemplified by N =8, wherein,toThe sampling sequence before updating, i.e. the sampling sequence corresponding to the original position value,toFor the updated sampling sequence, i.e. the sampling sequence indexed by the position value, the total number of operation steps D = of the butterfly algorithm is calculated,I.e. into level 0, level 1 and level 2 butterflies, due to the fact that in level 0 butterfliesm==1, so after grouping 8 sampling data in the updated sampling sequence pairwise according to the number of the position value, the sampling data corresponding to the position value 0 and the position value 1 are grouped into one group, the sampling data corresponding to the position value 2 and the position value 3 are grouped into one group, and the position values 4 and 4 are groupedThe sampling data corresponding to the position value 5 is divided into a group, and the sampling data corresponding to the position value 6 and the position value 7 is divided into a group; due to the 1 st stage butterfly operationm==2, so after 8 sampling data in the updated sampling sequence are grouped into two groups according to the serial number of the position value, the sampling data corresponding to the position value 0 and the position value 2 are grouped into one group, the sampling data corresponding to the position value 1 and the position value 3 are grouped into one group, the sampling data corresponding to the position value 4 and the position value 6 are grouped into one group, and the sampling data corresponding to the position value 5 and the position value 7 are grouped into one group; due to the butterfly operation in the 2 nd stagem==4, after 8 sampling data in the updated sampling sequence are grouped into two groups according to the serial number of the position value, the sampling data corresponding to the position value 0 and the position value 4 are grouped into one group, the sampling data corresponding to the position value 1 and the position value 5 are grouped into one group, the sampling data corresponding to the position value 2 and the position value 6 are grouped into one group, and the sampling data corresponding to the position value 3 and the position value 7 are grouped into one group.
First sample data in each packet is takenPerforming a d-th butterfly operation using the second sampled data in each packetAnd executing the d-stage butterfly operation. For the 0 th level butterfly operation, the sampling values of 8 sampling data are used as the input of the butterfly operation, that is, the sampling values corresponding to the position value 0, the position value 2, the position value 4 and the position value 6 are used as formulasThe sampling values corresponding to the position value 1, the position value 3, the position value 5 and the position value 7 are used as formulasThen rounding the output of the formula, regrouping the result of rounding as the input of the level 1 butterfly operation, specifically, outputting the level 0 butterfly operation、、、As a formula of level 1 butterfly operationThe 0 th stage butterfly operation is output、、、As a formula of level 1 butterfly operationAfter regrouping, the rounding result is reduced by 10000 times and then is used as the input of the 2 nd level butterfly operation, specifically, the input of the 1 st level butterfly operation is output、、As a formula of level 2 butterfly operationsOf the 1 st stage butterfly operation、、As a formula of level 2 butterfly operationsFinally, the butterfly operation result corresponding to each sampling data is rounded and then reduced by 10000 times to be used as the leakage waveform value of the corresponding sampling data, namely the leakage waveform valueX(0) ToX(7) Value of each leakage waveformXBoth comprise real and imaginary values.
The butterfly operation process with N =32 is in accordance with the principle of the butterfly operation process with N =8, and this implementation is not described herein again.
Further, the method for calculating the rotation factor corresponding to each of the sample data based on the updated sample sequence in the above embodiment includes:
wherein,indicating a position value ofThe rotation factor corresponding to the sampled data of, theIndicating a position value ofReal part of twiddle factor corresponding to the sampled dataIndicating a position value ofThe imaginary part of the corresponding twiddle factor of the sampled data.
Rounding means that only the integer part of the result of the calculation is retained, if, for example, it isIs 1200.567, then the result is obtainedThe result after rounding was 1200.
In the above embodiment, the method for calculating the effective value of the leakage current according to the leakage current waveform value and the leakage current value includes:
Ka conversion coefficient representing the leakage current value and the sampling value;
In specific implementation, the leakage type judgment item can be added, such as adding an alternating current threshold and a direct current threshold, when the leakage waveform value isIf the current is larger than the AC threshold, the result is AC leakage, and when the current is larger than the AC threshold, the waveform is determined to be AC leakageIf the current is larger than the direct current threshold value, the direct current leakage is judged as a result.
Example two
Referring to fig. 4, the present embodiment provides a leakage detecting device, including:
the system comprises a data acquisition unit, a data processing unit and a data processing unit, wherein the data acquisition unit is used for acquiring a sampling sequence belonging to a power grid period, and the sampling sequence consists of N sampling data comprising position values and sampling values;
the data processing unit is used for processing each sampling data in the sampling sequence in an index copy mode, converting an original coding value in the position value of the sampling data into a reverse coding value, and updating the sampling sequence and the sampling data in the sampling sequence;
a twiddle factor calculation unit for calculating twiddle factors corresponding to each of the sampled data based on the updated sampling sequence, respectively;
the leakage waveform calculation unit is used for taking the updated sampling data and the corresponding twiddle factors as input and calculating leakage waveform values corresponding to the sampling data one by adopting a butterfly algorithm;
and the result output unit is used for calculating the effective leakage current value according to the leakage current value of the leakage waveform value and outputting a leakage detection result.
Compared with the prior art, the beneficial effects of the leakage detection system provided by the embodiment of the invention are the same as those of the leakage detection method provided by the first embodiment, and are not described herein again.
EXAMPLE III
The present embodiment provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to perform the steps of the leakage detection method.
Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the embodiment are the same as those of the electric leakage detection method provided by the above technical scheme, and are not described herein again.
It will be understood by those skilled in the art that all or part of the steps in the method for implementing the invention may be implemented by hardware instructions related to a program, the program may be stored in a computer-readable storage medium, and when executed, the program includes the steps of the method of the embodiment, and the storage medium may be: ROM/RAM, magnetic disks, optical disks, memory cards, and the like.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (9)
1. An electrical leakage detection method, comprising:
collecting a sampling sequence belonging to a power grid period, wherein the sampling sequence is composed of N sampling data comprising position values and sampling values, and N represents the number of the sampling data;
processing each sampling data in the sampling sequence by adopting an index replication mode, converting an original code value in the position value of the sampling data into a reverse code value, and updating the sampling sequence and the sampling data in the sampling sequence;
respectively calculating a twiddle factor corresponding to each sampling data based on the updated sampling sequence;
taking the updated sampling data and the corresponding twiddle factors as input, and calculating leakage waveform values corresponding to the sampling data one to one by adopting a butterfly algorithm;
calculating a leakage current effective value according to the leakage current value of the leakage waveform value, and outputting a leakage current detection result;
the method for calculating the leakage waveform value corresponding to the sampling data one by adopting the butterfly algorithm comprises the following steps:
s1, based on miningThe number N of sample data in the sample sequence, using a formulaCalculating the total operation series D of the butterfly algorithm, and expressing the D-th level butterfly operation by D;
S2, grouping the N sampling data in the updated sampling sequence pairwise according to the serial number of the position value, and the position space value corresponding to the sampling data in each group ismSaidm=;
S3, using the formulaPerforming a d-th butterfly operation on the first sampled data in each of the groups by using a formulaPerforming a d-th stage butterfly operation on the second sample data in each of the packets, wherein,,;
said formulaMiddle, right of equationAs input to the formula in the d-th butterfly operation, left of the equationAs the output of the formula in the d-th stage butterfly operationMiddle, right of equationAs input to the formula in the d-th butterfly operation, left of the equationAs the output of the formula in the d-th stage butterfly operation, the initial value of d is 0, and the right side of the equationIs a position value ofnThe sampling value corresponding to the sampling data;
s4, determining whether d is equal to 0, if so, outputting the d-th stage butterfly operationAndrespectively rounding, taking the rounding result as the input of the next-stage butterfly operation, making D = D +1, re-executing the step S2, and if D is greater than 0 and D is less than D-1, outputting the D-th-stage butterfly operationAndrespectively reducing by 10000 times, rounding, taking the rounding result as the input of the next-stage butterfly operation, making D = D +1, executing step S2 again, if D is equal to D-1, directly outputting the D-th-stage butterfly operationAndrespectively reducing by 10000 times and then rounding to obtain the leakage waveform value of the corresponding sampling data;
s5, summarizing leakage waveform values corresponding to the N sampling data in the sampling sequence one by oneX。
2. The method of claim 1, wherein the step of collecting a sequence of samples belonging to a grid cycle comprises:
collecting a leakage current sequence belonging to a power grid period;
and converting the collected leakage current sequence into a sampling sequence through a conversion formula of a leakage current value and a sampling value, wherein the leakage current sequence consists of N leakage current data including a position value and a leakage current value.
3. The method of claim 1 or 2, wherein the step of processing each of the sample data in the sample sequence by index copy, converting an original code value in a position value in the sample data into a reverse code value, and updating the sample sequence and the sample data therein comprises:
respectively converting the original coding value in each sampling data position value in the sampling sequence into a binary value with the same number of bits as the reference by taking the binary bit number of the original coding value corresponding to the Nth sampling data position value as the reference;
copying the binary value reverse code index to obtain N reverse code values corresponding to the original code values one by one, and taking the decimal value of the reverse code values as an index of the corresponding sampling data position value;
and matching sampling values of position values corresponding to the original coding values according to the indexes of the position values of the sampling data, and updating the sampling sequence and the sampling data in the sampling sequence.
4. The method of claim 3, wherein the step of updating the sample sequence and the sample data therein comprises:
matching a sampling value corresponding to the code reversing code value in each position value based on the index relationship between the code reversing code value and the original code value in the position values of the sampling data so as to update the sampling data to which each position value belongs;
and updating the sampling sequence until the sampling data are updated.
5. The method of claim 1, wherein the step of calculating the rotation factor corresponding to each of the sample data based on the updated sample sequence comprises:
wherein,indicating a position value ofThe rotation factor corresponding to the sampled data of, theIndicating a position value ofThe real part of the twiddle factor corresponding to the sampled data of (a),indicating a position value ofThe imaginary part of the corresponding twiddle factor of the sampled data.
7. The method of claim 6, wherein the method of calculating the effective value of the leakage current from the value of the leakage waveform and the value of the leakage current comprises:
Ka conversion coefficient representing the leakage current value and the sampling value;
and when the effective value of the leakage current is larger than the threshold value, outputting the detection result of the leakage current as the leakage current, otherwise, outputting the detection result of the leakage current as the non-leakage current.
8. An electrical leakage detection system, comprising:
the system comprises a data acquisition unit, a data processing unit and a data processing unit, wherein the data acquisition unit is used for acquiring a sampling sequence belonging to a power grid period, and the sampling sequence consists of N sampling data comprising position values and sampling values;
the data processing unit is used for processing each sampling data in the sampling sequence in an index copy mode, converting an original coding value in the position value of the sampling data into a reverse coding value, and updating the sampling sequence and the sampling data in the sampling sequence;
a twiddle factor calculation unit for calculating twiddle factors corresponding to each of the sampled data based on the updated sampling sequence, respectively;
the leakage waveform calculation unit is used for taking the updated sampling data and the corresponding twiddle factors as input and calculating leakage waveform values corresponding to the sampling data one by adopting a butterfly algorithm;
the result output unit is used for calculating a leakage current effective value according to the leakage current value of the leakage waveform value and outputting a leakage detection result;
the method for calculating the leakage waveform value corresponding to the sampling data one by adopting the butterfly algorithm comprises the following steps:
s1, based on the number N of the sampling data in the sampling sequence, using the formulaCalculating the total operation series D of the butterfly algorithm, and expressing the D-th level butterfly operation by D;
S2, grouping the N sampling data in the updated sampling sequence pairwise according to the serial number of the position value, and the position space value corresponding to the sampling data in each group ismSaidm=;
S3, using the formulaPerforming a d-th butterfly operation on the first sampled data in each of the groups by using a formulaPerforming a d-th stage butterfly operation on the second sample data in each of the packets, wherein,,;
said formulaMiddle, right of equationAs input to the formula in the d-th butterfly operation, left of the equationButterfly operation in d-th level as the formulaOutput of a calculation, said formulaMiddle, right of equationAs input to the formula in the d-th butterfly operation, left of the equationAs the output of the formula in the d-th stage butterfly operation, the initial value of d is 0, and the right side of the equationIs a position value ofnThe sampling value corresponding to the sampling data;
s4, determining whether d is equal to 0, if so, outputting the d-th stage butterfly operationAndrespectively rounding, taking the rounding result as the input of the next-stage butterfly operation, making D = D +1, re-executing the step S2, and if D is greater than 0 and D is less than D-1, outputting the D-th-stage butterfly operationAndrespectively reducing by 10000 times, rounding, taking the rounding result as the input of the next-stage butterfly operation, making D = D +1, executing step S2 again, if D is equal to D-1, directly outputting the D-th-stage butterfly operationAndrespectively reducing by 10000 times and then rounding to obtain the leakage waveform value of the corresponding sampling data;
s5, summarizing leakage waveform values corresponding to the N sampling data in the sampling sequence one by oneX。
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of the claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010723410.4A CN111596228B (en) | 2020-07-24 | 2020-07-24 | Electric leakage detection method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010723410.4A CN111596228B (en) | 2020-07-24 | 2020-07-24 | Electric leakage detection method and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111596228A CN111596228A (en) | 2020-08-28 |
CN111596228B true CN111596228B (en) | 2020-10-09 |
Family
ID=72186638
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010723410.4A Active CN111596228B (en) | 2020-07-24 | 2020-07-24 | Electric leakage detection method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111596228B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113325358B (en) * | 2021-05-07 | 2023-08-01 | 南方电网数字电网研究院有限公司 | Rapid detection method and system for residual current of intelligent ammeter |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101262464A (en) * | 2008-03-14 | 2008-09-10 | 南京邮电大学 | Method for reconfiguring quick Fourier conversion in OFDM system |
CN101504637A (en) * | 2009-03-19 | 2009-08-12 | 北京理工大学 | Point-variable real-time FFT processing chip |
CN101847986A (en) * | 2009-03-27 | 2010-09-29 | 中兴通讯股份有限公司 | Circuit and method for realizing FFT/IFFT conversion |
CN102213603A (en) * | 2011-04-13 | 2011-10-12 | 北京航空航天大学 | Singlechip-based low-frequency weak signal detector |
CN109857980A (en) * | 2019-02-14 | 2019-06-07 | 安徽慕京信息技术有限公司 | A kind of fast Fourier analysis algorithm |
-
2020
- 2020-07-24 CN CN202010723410.4A patent/CN111596228B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101262464A (en) * | 2008-03-14 | 2008-09-10 | 南京邮电大学 | Method for reconfiguring quick Fourier conversion in OFDM system |
CN101504637A (en) * | 2009-03-19 | 2009-08-12 | 北京理工大学 | Point-variable real-time FFT processing chip |
CN101847986A (en) * | 2009-03-27 | 2010-09-29 | 中兴通讯股份有限公司 | Circuit and method for realizing FFT/IFFT conversion |
CN102213603A (en) * | 2011-04-13 | 2011-10-12 | 北京航空航天大学 | Singlechip-based low-frequency weak signal detector |
CN109857980A (en) * | 2019-02-14 | 2019-06-07 | 安徽慕京信息技术有限公司 | A kind of fast Fourier analysis algorithm |
Non-Patent Citations (1)
Title |
---|
智能型自适应剩余电流动作保护器的研究;宁建行;《中国优秀硕士学位论文全文数据库 工程科技Ⅱ辑》;20161015;正文第21-22页,第31-32页及第44-48页 * |
Also Published As
Publication number | Publication date |
---|---|
CN111596228A (en) | 2020-08-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108197156B (en) | Abnormal electric quantity data restoration method of electricity consumption information acquisition system and terminal equipment | |
EP3451165B1 (en) | Neural network operation device and method supporting few-bit floating-point number | |
CN106549673B (en) | Data compression method and device | |
CN108536657B (en) | Method and system for processing similarity of artificially filled address texts | |
CN113469189B (en) | Method, system and device for filling missing values of power utilization acquisition data | |
CN111753699B (en) | Method for improving digital metering accuracy of direct-current charging pile | |
CN111596228B (en) | Electric leakage detection method and device | |
CN114646829A (en) | Electrical topology identification method of low-voltage transformer area, system and terminal thereof | |
CN109039342B (en) | Compression method and system and decompression method and system of output data | |
CN112051446A (en) | Mixed base FFT implementation method and device for broadband measurement of power system | |
CN111313403A (en) | Low-voltage power distribution system network topology identification method based on Markov random field | |
Li et al. | Time series prediction of wireless network traffic flow based on wavelet analysis and BP neural network | |
CN108918928B (en) | Power signal self-adaptive reconstruction method in load decomposition | |
CN112730984B (en) | Low-voltage distribution network phase identification method based on intelligent electric meter | |
CN104318046A (en) | System and method for incrementally converting high dimensional data into low dimensional data | |
CN108108659B (en) | Island detection key feature extraction method based on empirical mode decomposition | |
CN110794210B (en) | Method and device for judging voltage harmonic isolation effect, power supply system, computer equipment and storage medium | |
CN102903104B (en) | Subtractive clustering based rapid image segmentation method | |
CN110703134A (en) | Small current grounding line selection and phase selection method based on fault sequence component | |
CN108334822B (en) | Kalman and modified wavelet transform filtering method based on electric vehicle charging nonlinear load characteristics | |
CN104320659A (en) | Background modeling method, device and apparatus | |
CN113125974B (en) | Method and device for detecting lithium precipitation of battery | |
CN113158134B (en) | Method, device and storage medium for constructing non-invasive load identification model | |
CN112801817B (en) | Electric energy quality data center construction method and system thereof | |
CN113541697A (en) | Reliability difference perception LDPC decoding method, equipment and system |
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 | ||
CP01 | Change in the name or title of a patent holder |
Address after: 4 / F, building 5, 555 Dongqing Road, hi tech Zone, Ningbo City, Zhejiang Province Patentee after: Ningbo Junlian Zhixing Technology Co.,Ltd. Address before: 4 / F, building 5, 555 Dongqing Road, hi tech Zone, Ningbo City, Zhejiang Province Patentee before: Ningbo Junlian Zhixing Technology Co.,Ltd. |
|
CP01 | Change in the name or title of a patent holder |