CN110470941B - Method, device and equipment for detecting leakage current of alternating current and storage medium - Google Patents
Method, device and equipment for detecting leakage current of alternating current and storage medium Download PDFInfo
- Publication number
- CN110470941B CN110470941B CN201910873204.9A CN201910873204A CN110470941B CN 110470941 B CN110470941 B CN 110470941B CN 201910873204 A CN201910873204 A CN 201910873204A CN 110470941 B CN110470941 B CN 110470941B
- Authority
- CN
- China
- Prior art keywords
- leakage current
- sampling
- current sampling
- value
- storage queue
- 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
Images
Classifications
-
- 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/0092—Arrangements for measuring currents or voltages or for indicating presence or sign thereof measuring current only
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Testing Of Short-Circuits, Discontinuities, Leakage, Or Incorrect Line Connections (AREA)
Abstract
The invention discloses a method, a device and equipment for detecting leakage current of alternating current and a computer readable storage medium, wherein the method comprises the following steps: collecting a leakage current analog signal at each sampling moment, and converting the leakage current analog signal at the current sampling moment into a leakage current sampling value by adopting analog-to-digital conversion; when the leakage current sampling values are obtained, judging whether the total number of the leakage current sampling values in the storage queue reaches a preset period sampling number or not; and when the total number of the leakage current sampling values in the storage queue reaches the sampling number of the preset period, acquiring a leakage current effective value at the previous sampling moment, and acquiring the leakage current effective value at the current sampling moment according to the leakage current effective value at the previous sampling moment, the leakage current sampling value corresponding to the earliest data in the storage queue and the leakage current sampling value at the current sampling moment. The invention solves the technical problems that the existing leakage current detection method is slow in detection speed and cannot detect in real time.
Description
Technical Field
The present invention relates to the field of power measurement, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for detecting leakage current of alternating current.
Background
With the increasing of industrial and commercial and residential household electric equipment, the number of low-voltage electric nodes is increased, and various safety electric accidents caused by electric leakage are frequent due to the nonstandard electric equipment and wiring or the aging of the equipment, so that huge losses are brought to social property and personal safety. In order to prevent safety power utilization accidents caused by electric leakage, electric leakage protection needs to be carried out on electric equipment and an electric circuit, detection of electric leakage current is an important part in electric leakage protection, at least one complete cycle signal needs to be collected again before detection in the current detection method commonly used for electric leakage current, then the leakage current value is calculated according to all signals in at least one collected complete cycle, and a certain time is consumed for collecting all signals in one complete cycle, so that the detection method is slow in detection speed and cannot carry out real-time detection.
Disclosure of Invention
The invention mainly aims to provide a method, a device and equipment for detecting leakage current of alternating current and a computer readable storage medium, and aims to solve the problems that the existing leakage current detection method is slow in detection speed and cannot detect in real time.
In order to achieve the above object, the present invention provides a method for detecting leakage current of alternating current, comprising the steps of:
collecting a leakage current analog signal at each sampling moment, and converting the leakage current analog signal at the current sampling moment into a leakage current sampling value by adopting analog-to-digital conversion;
when the leakage current sampling values are obtained, judging whether the total number of the leakage current sampling values in the storage queue reaches a preset period sampling number or not;
and when the total number of the leakage current sampling values in the storage queue reaches the sampling number of the preset period, acquiring a leakage current effective value at the previous sampling moment, and acquiring the leakage current effective value at the current sampling moment according to the leakage current effective value at the previous sampling moment, the leakage current sampling value corresponding to the earliest data in the storage queue and the leakage current sampling value at the current sampling moment.
Optionally, the step of obtaining the effective value of the leakage current at the current sampling time according to the effective value of the leakage current at the previous sampling time, the leakage current sampling value corresponding to the earliest data in the storage queue, and the leakage current sampling value at the current sampling time includes:
inputting a leakage current effective value at the previous sampling moment, a leakage current sampling value at the current sampling moment and a leakage current sampling value marked as the earliest data in a storage queue into a preset leakage current effective value first calculation modelIn obtaining the leakage current at the current sampling time is effectiveValue of wherein I1Effective value of leakage current at current sampling moment, I0Effective value of leakage current at previous sampling moment IAt presentFor the leakage current sample value at the current sampling moment, IAt the earliest stageAnd K is a preset normalization coefficient, and is a leakage current sampling value corresponding to the earliest data in the storage queue.
Optionally, after the step of obtaining the effective value of the leakage current at the current sampling time according to the effective value of the leakage current at the previous sampling time, the leakage current sampling value corresponding to the earliest data in the storage queue, and the leakage current sampling value at the current sampling time, the method further includes:
covering the leakage current sampling value at the current sampling moment with the leakage current sampling value corresponding to the earliest data in the storage queue, and setting the latest data as the leakage current sampling value at the current sampling moment;
judging whether the storage position corresponding to the latest data is in the last storage position in the storage queue or not;
if so, changing the earliest data into a leakage current sampling value corresponding to a first storage position in the storage queue;
if not, the earliest data is changed into a leakage current sampling value corresponding to the next storage position of the latest data.
Optionally, after the step of determining whether the total number of the leakage current sampling values in the storage queue reaches the preset cycle sampling number when the leakage current sampling value is obtained, the method further includes:
when the total number of all the leakage current sampling values in the storage queue does not reach the preset period sampling number, judging whether the total number of all the leakage current sampling values in the storage queue reaches the preset period sampling number minus one;
when the total number of all leakage current sampling values in the storage queue reaches the value minus one of the sampling number of the preset period, storing the leakage current sampling value at the current sampling moment at the next storage position of the latest data in the storage queue, changing the latest data into the leakage current sampling value at the current sampling moment, and taking the leakage current sampling value at the first storage position in the storage queue as the earliest data to update the storage queue;
and obtaining the actual leakage current effective value at the current sampling moment according to each leakage current sampling value in the updated storage queue.
Optionally, the step of obtaining the actual leakage current effective value at the current sampling time according to each updated leakage current sampling value in the storage queue includes:
inputting each leakage current sampling value in the updated storage queue into a preset leakage current effective value second calculation modelObtaining an effective value of leakage current at the current sampling time, wherein I0Is the effective value of the leakage current at the current sampling moment, K is a preset coefficient, N is a preset periodic sampling number, InAnd N is the leakage current sampling value corresponding to the nth storage position in the storage queue, wherein N is 1, 2.
Optionally, after the step of determining whether the total number of all the leakage current sampling values in the storage queue reaches the preset period sampling number minus one, the method further includes:
when the total number of all the leakage current sampling values in the storage queue does not reach the value obtained by subtracting the sampling number in the preset period, judging whether the total number of all the leakage current sampling values in the storage queue is 0 or not;
and when the total number of all the leakage current sampling values in the storage queue is 0, storing the leakage current sampling value at the current sampling moment in a first storage position in the storage queue, and taking the leakage current sampling value at the current sampling moment as latest data.
Optionally, after the step of determining whether the total number of all the leakage current sampling values in the storage queue is 0 when the total number of all the leakage current sampling values in the storage queue does not reach the preset period sampling number minus one, the method further includes:
and when the total number of all the leakage current sampling values in the storage queue is not 0, storing the leakage current sampling value at the current sampling moment in the next storage position of the latest data in the storage queue, and changing the latest data into the leakage current sampling value at the current sampling moment.
In order to achieve the above object, the present invention further provides an ac leakage current detection device, which includes a current sensing module, an ADC module and a leakage current operation processing module;
the current sensing module is used for collecting a leakage current analog signal at each sampling moment;
the analog-to-digital converter ADC module is used for converting the leakage current analog signal at the current sampling moment into a leakage current sampling value by adopting analog-to-digital conversion;
the leakage current operation processing module is used for judging whether the total number of the leakage current sampling values in the storage queue reaches a preset period sampling number or not when the leakage current sampling values are obtained; and when the total number of the leakage current sampling values in the storage queue reaches the sampling number of the preset period, acquiring a leakage current effective value at the previous sampling moment, and acquiring the leakage current effective value at the current sampling moment according to the leakage current effective value at the previous sampling moment, the leakage current sampling value corresponding to the earliest data in the storage queue and the leakage current sampling value at the current sampling moment.
In order to achieve the above object, the present invention further provides an apparatus for detecting a leakage current of an alternating current, the apparatus comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the steps of the method for detecting a leakage current of an alternating current as described above.
To achieve the above object, the present invention further provides a computer-readable storage medium having a computer program stored thereon, the computer program, when being executed by a processor, implementing the steps of the method for detecting leakage current of alternating current as described above.
The invention provides a method, a device and equipment for detecting leakage current of alternating current and a computer readable storage medium, wherein a leakage current analog signal is collected at each sampling moment, and the leakage current analog signal at the current sampling moment is converted into a leakage current sampling value by adopting analog-to-digital conversion; when the leakage current sampling values are obtained, judging whether the total number of the leakage current sampling values in the storage queue reaches a preset period sampling number or not; and when the total number of the leakage current sampling values in the storage queue reaches the sampling number of the preset period, acquiring a leakage current effective value at the previous sampling moment, and acquiring the leakage current effective value at the current sampling moment according to the leakage current effective value at the previous sampling moment, the leakage current sampling value corresponding to the earliest data in the storage queue and the leakage current sampling value at the current sampling moment. Therefore, after sampling of a sampling period is completed for the first time, namely all signals in a complete cycle are acquired for the first time, the effective value of the leakage current at the current moment can be calculated when a signal is acquired at each subsequent time, and other signals in a cycle after the signal is acquired do not need to be waited for, so that the leakage current can be detected in real time, and the detection rate is higher.
Drawings
FIG. 1 is a schematic diagram of a hardware operating environment according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a method for detecting leakage current of an alternating current according to a first embodiment of the present invention;
FIG. 3 is a schematic flow chart illustrating a leakage current detection method according to a second embodiment of the present invention;
FIG. 4 is a schematic flow chart of a method for detecting leakage current of an alternating current according to a third embodiment of the present invention;
FIG. 5 is a schematic flow chart of a method for detecting leakage current of alternating current according to a fourth embodiment of the present invention;
fig. 6 is a flowchart illustrating a method for detecting leakage current of ac power according to a fifth embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Referring to fig. 1, fig. 1 is a schematic diagram of a hardware structure of an apparatus provided in each embodiment of the present invention. The apparatus comprises components such as a communication module 10, a memory 20, and a processor 30. Those skilled in the art will appreciate that the apparatus shown in fig. 1 may also include more or fewer components than those shown, or combine certain components, or a different arrangement of components. Wherein, the processor 30 is connected to the memory 20 and the communication module 10, respectively, and the memory 20 stores thereon a computer program, which is executed by the processor 30 at the same time.
The communication module 10 may be connected to an external device through a network. The communication module 10 may receive data sent by an external device, and may also send data, instructions, and information to the external device, where the external device may be an electric device, a monitoring center, a mobile phone, a tablet computer, a notebook computer, a desktop computer, or other electronic devices.
The memory 20 may be used to store software programs as well as various data. The memory 20 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program (calculating an effective value of leakage current) required for at least one function, and the like; the storage data area may store data or information created according to the use of the device, or the like. Further, the memory 20 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The processor 30, which is a control center of the apparatus, connects various parts of the entire apparatus using various interfaces and lines, and performs various functions of the apparatus and processes data by operating or executing software programs and/or modules stored in the memory 20 and calling data stored in the memory 20, thereby performing overall monitoring of the apparatus. Processor 30 may include one or more processing units; preferably, the processor 30 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 30.
Although not shown in fig. 1, the device may further include a circuit control module, where the circuit control module is used for being connected to a mains supply to implement power control and ensure normal operation of other components.
Those skilled in the art will appreciate that the configuration of the apparatus shown in fig. 1 is not intended to be limiting of the apparatus and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
Various embodiments of the method of the present invention are presented in terms of the above-described hardware architecture.
Referring to fig. 2, in a first embodiment of the method for detecting leakage current of alternating current of the present invention, the method for detecting leakage current of alternating current includes the steps of:
step S10, collecting a leakage current analog signal at each sampling moment, and converting the leakage current analog signal at the current sampling moment into a leakage current sampling value by adopting analog-to-digital conversion;
in the scheme, the alternating current refers to a current with periodically changing magnitude and direction, the current waveform is a sine curve and has symmetry and periodicity, the time length of one cycle is related to the frequency of the alternating current, and the specific relation is that T is 1/f, wherein T is the time length of one cycle, the unit is second, and f is frequency. Because the sinusoidal curve has symmetry and periodicity, a half cycle time can be selected as a sampling period, and a cycle time can also be selected as a sampling period, the number of samples in the sampling period can be 16 or 32 or other values, and the number of samples in the sampling period is not limited herein.
Each sampling moment of a current sensor in the alternating current leakage current detection equipment acquires a leakage current Analog signal, and then the leakage current Analog signal acquired at the current sampling moment is sent to an Analog-to-Digital Converter (ADC), and the ADC converts the leakage current Analog signal at the current sampling moment into a leakage current sampling value.
Step S20, when the leakage current sampling values are obtained, judging whether the total number of the leakage current sampling values in the storage queue reaches the preset cycle sampling number;
when the leakage current sampling value at the current sampling moment is obtained, whether the total number of the stored leakage current sampling values in the storage queue reaches the preset cycle sampling number or not is judged, and the total number of the storage positions in the storage queue is the same as the preset cycle sampling number.
And step S30, when the total number of the leakage current sampling values in the storage queue reaches the sampling number of the preset period, acquiring the effective value of the leakage current at the previous sampling moment, and acquiring the effective value of the leakage current at the current sampling moment according to the effective value of the leakage current at the previous sampling moment, the leakage current sampling value corresponding to the earliest data in the storage queue and the leakage current sampling value at the current sampling moment.
The total number of the leakage current sampling values in the storage queue reaches the preset period sampling number, which indicates that the leakage current sampling values are stored in all storage positions in the storage queue, and simultaneously indicates that a period of leakage current signals are collected before the current sampling moment, namely if a period corresponds to 1/2 cycles, a half cycle of leakage current signals are collected, and if a period corresponds to 1 cycle, a complete cycle of leakage current signals are collected. When the total number of the leakage current sampling values in the storage queue reaches the sampling number of the preset period, acquiring a leakage current effective value at the previous sampling moment, and acquiring the leakage current effective value at the current sampling moment according to the leakage current effective value at the previous sampling moment, the leakage current effective value corresponding to the earliest data in the storage queue and the leakage current effective value at the current sampling moment, wherein the specific process is as follows:
inputting a leakage current effective value at the previous sampling moment, a leakage current sampling value at the current sampling moment and a leakage current sampling value marked as the earliest data in a storage queue into a preset leakage current effective value first calculation modelObtaining an effective value of leakage current at the current sampling time, wherein I1Effective value of leakage current at current sampling moment, I0Effective value of leakage current at previous sampling moment IAt presentFor the leakage current sample value at the current sampling moment, IAt the earliest stageAnd K is a preset normalization coefficient, and is a leakage current sampling value corresponding to the earliest data in the storage queue.
In the embodiment, a leakage current analog signal is acquired at each sampling moment, and the leakage current analog signal at the current sampling moment is converted into a leakage current sampling value by adopting analog-to-digital conversion; when the leakage current sampling values are obtained, judging whether the total number of the leakage current sampling values in the storage queue reaches a preset period sampling number or not; and when the total number of the leakage current sampling values in the storage queue reaches the sampling number of the preset period, acquiring a leakage current effective value at the previous sampling moment, and acquiring the leakage current effective value at the current sampling moment according to the leakage current effective value at the previous sampling moment, the leakage current sampling value corresponding to the earliest data in the storage queue and the leakage current sampling value at the current sampling moment. Therefore, after all signals in a complete cycle are collected for the first time, the effective value of the leakage current at the current moment can be quickly calculated when one signal is collected subsequently every time, and other signals in a cycle after the signal is collected do not need to be waited for, so that the leakage current can be detected in real time and the detection rate is higher.
Further, a second embodiment of the method for detecting leakage current of alternating current according to the first embodiment of the method for detecting leakage current of alternating current of the present application is proposed, and in this embodiment, after step S30, the method further includes:
step S40, covering the leakage current sampling value at the current sampling moment on the leakage current sampling value corresponding to the earliest data in the storage queue, and setting the latest data as the leakage current sampling value at the current sampling moment;
step S50, judging whether the storage position corresponding to the latest data is at the last storage position in the storage queue; if yes, go to step S60; if not, go to step S70;
step S60, changing the earliest data into a leakage current sampling value corresponding to the first storage position in the storage queue;
in step S70, the earliest data is changed to the leakage current sample value corresponding to the next storage location of the latest data.
In this embodiment, after the leakage current effective value at the current sampling time is obtained through calculation, the leakage current sampling value acquired at the current sampling time is covered with the leakage current sampling value corresponding to the oldest data in the storage queue, and then the latest data in the storage queue is changed into the leakage current sampling value acquired at the current time. The leakage current sampling value corresponding to the earliest data is covered, the earliest data in the storage queue needs to be changed again, at this time, whether the storage position of the latest data in the storage queue is the last position of the storage queue or not is judged, if yes, the leakage current sampling value stored at the first storage position in the storage queue is used as the earliest data, and if not, the leakage current sampling value stored at the next storage position of the latest data in the storage queue is used as the earliest data.
For example, there are 10 storage locations in the storage queue, before the current sample time leakage current sample value is stored in the storage queue, the storage location of the earliest data in the storage queue is the last location, the storage location of the latest data is the 9 th, the current sample time leakage current sample value will be stored in the last location, that is, the current sample time leakage current sample value covers the stored leakage current sample value, and the latest data is changed to the current sample time leakage current sample value stored in the current sample time leakage current sample value, at this time, the storage location of the latest data is the last location, and the earliest data is already covered, the earliest data needs to be redetermined, and the storage location of the latest data is the last location, the earliest data will be changed to the leakage current sample value corresponding to the first storage location.
For another example, there are 10 storage locations in the storage queue, before storing the current sample time leakage current sample value in the storage queue, the oldest data storage location in the storage queue is 9 th, the newest data storage location is 8 th, the current sample time leakage current sample value is stored in 9 th, that is, the stored leakage current sample value is overwritten by the leakage current sample value at the current sampling time, and the latest data is changed to the leakage current sample value at the current sampling time stored at the position (9 th storage position), where the storage position of the latest data is the 9 th storage position and the earliest data is overwritten, the earliest data needs to be determined again, since the storage location of the latest data is not the last location, the earliest data is changed to the leakage current sample value corresponding to the next storage location of the 9 th storage location, i.e., the 10 th storage location.
The embodiment provides a strategy for storing the collected leakage current sampling value at the current sampling moment into the storage queue by adopting a first-in first-out principle after calculating the effective value of the leakage current, so that when the leakage current sampling value is calculated at the next sampling moment, each leakage current sampling value of the storage queue is the leakage current sampling value in a period closest to the next sampling moment.
Further, referring to fig. 3, a third embodiment of the method for detecting leakage current of alternating current according to the first embodiment of the method for detecting leakage current of alternating current according to the present application is provided, and in this embodiment, after step S20, the method further includes:
step S21, when the total number of all the leakage current sampling values in the storage queue does not reach the preset period sampling number, judging whether the total number of all the leakage current sampling values in the storage queue reaches the preset period sampling number minus one;
step S22, when the total number of all leakage current sampling values in the storage queue reaches the value minus one of the sampling number of the preset period, the leakage current sampling value at the current sampling moment is stored in the next storage position of the latest data in the storage queue, the latest data is changed into the leakage current sampling value at the current sampling moment, and the leakage current sampling value at the first storage position in the storage queue is used as the earliest data to update the storage queue;
and step S23, obtaining the actual leakage current effective value at the current sampling moment according to each leakage current sampling value in the updated storage queue.
In this embodiment, when it is determined that the total number of all stored leakage current sampling values in the storage queue at the current sampling time does not reach the preset cycle sampling number, it is indicated that the leakage current sampling values are still not stored in the storage queue at the storage position, that is, a leakage current signal of one cycle is not collected before the current sampling time, at this time, it is determined whether the number of the leakage current sampling values stored in the storage queue reaches the preset cycle sampling number minus one, and since the number of the storage positions in the storage queue is the same as the preset cycle sampling number, it is determined whether only one storage position in the storage queue stores no leakage current sampling value. And when the leakage current sampling value is determined to be not stored in only one storage position in the storage queue, storing the leakage current sampling value at the current sampling moment in the next storage position of the latest data in the storage queue, namely the latest position in the storage queue, changing the latest data into the leakage current sampling value at the current sampling moment, taking the leakage current sampling value at the first storage position in the storage queue as the earliest data, and updating the storage queue.
And finally, obtaining an actual leakage current effective value at the current sampling moment according to each leakage current sampling value in the updated storage queue, wherein the specific process of obtaining the actual leakage current effective value is as follows:
inputting each leakage current sampling value in the updated storage queue into a preset leakage current effective value second calculation modelObtaining an effective value of leakage current at the current sampling time, wherein I0Is the effective value of the leakage current at the current sampling moment, K is a preset coefficient, N is a preset periodic sampling number, InAnd N is the leakage current sampling value corresponding to the nth storage position in the storage queue, wherein N is 1, 2.
The leakage current detection device of this embodiment directly calculates a policy of obtaining a leakage current effective value according to a collected leakage current sampling value in one cycle when an accumulated number of collected leakage current sampling values (including a currently collected leakage current sampling value) reaches a preset cycle number for the first time.
Further, referring to fig. 4, a fourth embodiment of the method for detecting leakage current of alternating current according to the first embodiment of the method for detecting leakage current of alternating current according to the present application is provided, and in this embodiment, after step S21, the method further includes:
step S24, when the total number of all the leakage current sampling values in the storage queue does not reach the preset period sampling number minus one, judging whether the total number of all the leakage current sampling values in the storage queue is 0;
and step S25, when the total number of all the leakage current sampling values in the storage queue is 0, storing the leakage current sampling value at the current sampling moment in a first storage position in the storage queue, and taking the leakage current sampling value at the current sampling moment as the latest data.
In this embodiment, when the total number of all the leakage current sampling values in the storage queue does not reach the preset period sampling value minus one, it is determined that the leakage current sampling values are not stored in at least two storage positions in the storage queue, at this time, it is further determined whether the total number of all the leakage current sampling values in the storage queue is 0, that is, it is determined whether the current time is a first-time collection leakage current sampling value, when the total number of all the leakage current sampling values in the storage queue is 0, it is indicated that the current sampling time is the first-time collection leakage current sampling value, the leakage current sampling value at the current sampling time is directly stored in the first storage position in the storage queue, and the leakage current sampling value at the current sampling time is used as the latest data.
The embodiment provides a processing strategy for a leakage current sampling value when leakage current detection equipment collects the leakage current sampling value for the first time.
Further, referring to fig. 5, a fifth embodiment of the method for detecting a leakage current of an alternating current according to the present application is provided, and in the present embodiment, after step S24, the method further includes:
and step S26, when the total number of all the leakage current sampling values in the storage queue is not 0, storing the leakage current sampling value at the current sampling moment in the next storage position of the latest data in the storage queue, and changing the latest data into the leakage current sampling value at the current sampling moment.
In this embodiment, when the total number of all leakage current sampling values in the storage queue is not 0, that is, it is determined that the current sampling time is not the first time of collecting the leakage current sampling value, and the total number of the collected leakage current sampling values does not reach the preset cycle sampling number, the leakage current sampling value at the current sampling time is stored in the next storage location of the latest data in the storage queue, and the latest data is changed into the leakage current sampling value at the non-current sampling time.
The embodiment provides a processing strategy for a current collected leakage current sampling value by leakage current detection equipment when the total number of the collected leakage current sampling values does not reach the preset cycle sampling number.
The invention also provides an alternating current leakage current detection device, which comprises a current sensing module, an analog-to-digital converter (ADC) module and a leakage current operation processing module;
the current sensing module is used for collecting a leakage current analog signal at each sampling moment;
the analog-to-digital converter ADC module is used for converting the leakage current analog signal at the current sampling moment into a leakage current sampling value by adopting analog-to-digital conversion;
the leakage current operation processing module is used for judging whether the total number of the leakage current sampling values in the storage queue reaches a preset period sampling number or not when the leakage current sampling values are obtained; and when the total number of the leakage current sampling values in the storage queue reaches the sampling number of the preset period, acquiring a leakage current effective value at the previous sampling moment, and acquiring the leakage current effective value at the current sampling moment according to the leakage current effective value at the previous sampling moment, the leakage current sampling value corresponding to the earliest data in the storage queue and the leakage current sampling value at the current sampling moment.
The invention also proposes a computer-readable storage medium on which a computer program is stored. The computer-readable storage medium may be the Memory 20 in the device of fig. 1, and may also be at least one of a ROM (Read-Only Memory)/RAM (Random Access Memory), a magnetic disk, and an optical disk, and the computer-readable storage medium includes several pieces of information for causing the device to perform the method according to the embodiments of the present invention.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or system that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner.
The above description is only a preferred embodiment of the present invention, and not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by using the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.
Claims (9)
1. A method for detecting leakage current of alternating current is characterized by comprising the following steps:
collecting a leakage current analog signal at each sampling moment, and converting the leakage current analog signal at the current sampling moment into a leakage current sampling value by adopting analog-to-digital conversion;
when the leakage current sampling values are obtained, judging whether the total number of the leakage current sampling values in the storage queue reaches a preset period sampling number or not;
when the total number of the leakage current sampling values in the storage queue reaches the sampling number of a preset period, acquiring a leakage current effective value at the previous sampling moment, and acquiring the leakage current effective value at the current sampling moment according to the leakage current effective value at the previous sampling moment, the leakage current sampling value corresponding to the earliest data in the storage queue and the leakage current sampling value at the current sampling moment;
the step of obtaining the effective value of the leakage current at the current sampling moment according to the effective value of the leakage current at the previous sampling moment, the sampling value of the leakage current corresponding to the earliest data in the storage queue and the sampling value of the leakage current at the current sampling moment comprises the following steps:
inputting a leakage current effective value at the previous sampling moment, a leakage current sampling value at the current sampling moment and a leakage current sampling value marked as the earliest data in a storage queue into a preset leakage current effective value first calculation modelObtaining an effective value of leakage current at the current sampling time, wherein I1Effective value of leakage current at current sampling moment, I0Effective value of leakage current at previous sampling moment, IAt presentFor the leakage current sample value at the current sampling moment, IAt the earliest stageAnd K is a preset normalization coefficient, and N is a preset periodic sampling number.
2. The method according to claim 1, wherein after the step of obtaining the effective value of the leakage current at the current sampling time according to the effective value of the leakage current at the previous sampling time, the leakage current sample value corresponding to the earliest data in the storage queue, and the leakage current sample value at the current sampling time, the method further comprises:
covering the leakage current sampling value at the current sampling moment on the leakage current sampling value corresponding to the earliest data in the storage queue, and setting the leakage current sampling value at the current sampling moment as the latest data;
judging whether the storage position corresponding to the latest data is in the last storage position in the storage queue or not;
if so, changing the earliest data into a leakage current sampling value corresponding to a first storage position in the storage queue;
if not, the earliest data is changed into a leakage current sampling value corresponding to the next storage position of the latest data.
3. The method according to any one of claims 1 to 2, wherein after the step of determining whether the total number of the leakage current sample values in the storage queue reaches the preset cycle sample number when the leakage current sample values are obtained, the method further comprises:
when the total number of all the leakage current sampling values in the storage queue does not reach the preset period sampling number, judging whether the total number of all the leakage current sampling values in the storage queue reaches the preset period sampling number minus one;
when the total number of all leakage current sampling values in the storage queue reaches the value minus one of the sampling number of the preset period, storing the leakage current sampling value at the current sampling moment at the next storage position of the latest data in the storage queue, changing the latest data into the leakage current sampling value at the current sampling moment, and taking the leakage current sampling value at the first storage position in the storage queue as the earliest data to update the storage queue;
and obtaining the actual leakage current effective value at the current sampling moment according to each leakage current sampling value in the updated storage queue.
4. A method as claimed in claim 3, wherein said step of obtaining the effective value of the actual leakage current at the current sampling time according to the updated values of the leakage current samples in the storage queue comprises:
inputting each leakage current sampling value in the updated storage queue into a preset leakage current effective value second calculation modelObtaining an effective value of leakage current at the current sampling time, wherein I1Is the effective value of the leakage current at the current sampling moment, N is the sampling number of the preset period, InAnd N is the leakage current sampling value corresponding to the nth storage position in the storage queue, wherein N is 1, 2.
5. The method according to claim 4, wherein after the step of determining whether the total number of all leakage current samples in the storage queue reaches the number of samples in the preset period minus one, the method further comprises:
when the total number of all the leakage current sampling values in the storage queue does not reach the value obtained by subtracting the sampling number in the preset period, judging whether the total number of all the leakage current sampling values in the storage queue is 0 or not;
and when the total number of all the leakage current sampling values in the storage queue is 0, storing the leakage current sampling value at the current sampling moment in a first storage position in the storage queue, and taking the leakage current sampling value at the current sampling moment as latest data.
6. The method according to claim 5, wherein after the step of determining whether the total number of all leakage current sample values in the storage queue is 0 when the total number of all leakage current sample values in the storage queue does not reach the preset period sample number minus one, the method further comprises:
and when the total number of all the leakage current sampling values in the storage queue is not 0, storing the leakage current sampling value at the current sampling moment in the next storage position of the latest data in the storage queue, and changing the latest data into the leakage current sampling value at the current sampling moment.
7. The alternating current leakage current detection device is characterized by comprising a current sensing module, an analog-to-digital converter (ADC) module and a leakage current operation processing module;
the current sensing module is used for collecting a leakage current analog signal at each sampling moment;
the analog-to-digital converter ADC module is used for converting the leakage current analog signal at the current sampling moment into a leakage current sampling value by adopting analog-to-digital conversion;
the leakage current operation processing module is used for judging whether the total number of the leakage current sampling values in the storage queue reaches a preset period sampling number or not when the leakage current sampling values are obtained; when the total number of the leakage current sampling values in the storage queue reaches the sampling number of a preset period, acquiring a leakage current effective value at the previous sampling moment, and acquiring the leakage current effective value at the current sampling moment according to the leakage current effective value at the previous sampling moment, the leakage current sampling value corresponding to the earliest data in the storage queue and the leakage current sampling value at the current sampling moment;
the step of obtaining the effective value of the leakage current at the current sampling moment according to the effective value of the leakage current at the previous sampling moment, the sampling value of the leakage current corresponding to the earliest data in the storage queue and the sampling value of the leakage current at the current sampling moment comprises the following steps:
inputting a leakage current effective value at the previous sampling moment, a leakage current sampling value at the current sampling moment and a leakage current sampling value marked as the earliest data in a storage queue into a preset leakage current effective value first calculation modelObtaining an effective value of leakage current at the current sampling time, wherein I1Effective value of leakage current at current sampling moment, I0Effective value of leakage current at previous sampling moment, IAt presentFor the leakage current sample value at the current sampling moment, IAt the earliest stageAnd K is a preset normalization coefficient, and N is a preset periodic sampling number.
8. An alternating current leakage current detection apparatus, characterized in that the alternating current leakage current detection apparatus comprises a memory, a processor and a computer program stored on the memory and executable on the processor, which computer program, when executed by the processor, implements the steps of the alternating current leakage current detection method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that a computer program is stored thereon, which, when being executed by a processor, carries out the steps of the method of detecting leakage current of alternating current according to any one of claims 1 to 6.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910873204.9A CN110470941B (en) | 2019-09-16 | 2019-09-16 | Method, device and equipment for detecting leakage current of alternating current and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910873204.9A CN110470941B (en) | 2019-09-16 | 2019-09-16 | Method, device and equipment for detecting leakage current of alternating current and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110470941A CN110470941A (en) | 2019-11-19 |
CN110470941B true CN110470941B (en) | 2021-10-08 |
Family
ID=68515919
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910873204.9A Active CN110470941B (en) | 2019-09-16 | 2019-09-16 | Method, device and equipment for detecting leakage current of alternating current and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110470941B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113391234B (en) * | 2021-05-17 | 2023-12-12 | 深圳市合广测控技术有限公司 | Leakage detection method, control device and leakage detection equipment |
CN114217242A (en) * | 2021-08-31 | 2022-03-22 | 威胜集团有限公司 | Short circuit detection method, short circuit protection device and computer readable storage medium |
CN115219769B (en) * | 2022-09-20 | 2023-04-07 | 江苏东成工具科技有限公司 | Current detection method, electric tool and computer readable medium |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0817552A (en) * | 1994-06-30 | 1996-01-19 | Mitsubishi Electric Corp | Deterioration detecting device for lightning arrester |
CN1553206A (en) * | 2003-12-18 | 2004-12-08 | 西安交通大学 | On-line Monitoring System for Outer Insulation Leakage Current of Power Equipment in Substation |
WO2006044035A2 (en) * | 2004-10-19 | 2006-04-27 | Echelon Corporation | Method and apparatus for an electric meter |
JP2010127860A (en) * | 2008-11-28 | 2010-06-10 | Patokkusu Japan Kk | Device and method for measuring leak current |
JP2010249747A (en) * | 2009-04-17 | 2010-11-04 | Toyo Networks & System Integration Co Ltd | Insulation monitoring device |
CN204188757U (en) * | 2014-09-30 | 2015-03-04 | 广东电网有限责任公司茂名供电局 | Portable power equipment leakage point insulating pick-up unit |
CN106597229A (en) * | 2013-05-07 | 2017-04-26 | 陈国栋 | Working method of insulation online monitoring system for voltage transformation equipment (greater than 35kV) |
CN107528296A (en) * | 2017-07-11 | 2017-12-29 | 江苏固德威电源科技股份有限公司 | Residual current protection method applied to photovoltaic DC-to-AC converter |
-
2019
- 2019-09-16 CN CN201910873204.9A patent/CN110470941B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0817552A (en) * | 1994-06-30 | 1996-01-19 | Mitsubishi Electric Corp | Deterioration detecting device for lightning arrester |
CN1553206A (en) * | 2003-12-18 | 2004-12-08 | 西安交通大学 | On-line Monitoring System for Outer Insulation Leakage Current of Power Equipment in Substation |
WO2006044035A2 (en) * | 2004-10-19 | 2006-04-27 | Echelon Corporation | Method and apparatus for an electric meter |
JP2010127860A (en) * | 2008-11-28 | 2010-06-10 | Patokkusu Japan Kk | Device and method for measuring leak current |
JP2010249747A (en) * | 2009-04-17 | 2010-11-04 | Toyo Networks & System Integration Co Ltd | Insulation monitoring device |
CN106597229A (en) * | 2013-05-07 | 2017-04-26 | 陈国栋 | Working method of insulation online monitoring system for voltage transformation equipment (greater than 35kV) |
CN204188757U (en) * | 2014-09-30 | 2015-03-04 | 广东电网有限责任公司茂名供电局 | Portable power equipment leakage point insulating pick-up unit |
CN107528296A (en) * | 2017-07-11 | 2017-12-29 | 江苏固德威电源科技股份有限公司 | Residual current protection method applied to photovoltaic DC-to-AC converter |
Also Published As
Publication number | Publication date |
---|---|
CN110470941A (en) | 2019-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110470941B (en) | Method, device and equipment for detecting leakage current of alternating current and storage medium | |
EP2413105A2 (en) | Method and apparatus for a demand management monitoring system | |
CN102866301A (en) | Grounding resistance analyzing device and grounding resistance analyzing method | |
CN108986418A (en) | intelligent alarm method, device, equipment and storage medium | |
US9733639B2 (en) | Dynamic facility management system | |
WO2014063635A1 (en) | Data sampling method and system, and application method and system thereof in parameter identification | |
JP2016064077A (en) | Washing day recommendation system, washing day recommendation device and laundry drying tool | |
CN105843731B (en) | Computer system and performance monitoring method executed by computer system | |
CN101295324A (en) | Acquisition and processing method of electric power data | |
CN117639270A (en) | Transformer substation monitoring and operation and maintenance system based on digital twinning | |
CN113391234B (en) | Leakage detection method, control device and leakage detection equipment | |
CN211236077U (en) | Data contrast type electric power overload early warning device | |
CN211979065U (en) | Cable aging detection system | |
CN110763942B (en) | Method and device for detecting residual life of dry-type transformer | |
Vacariu et al. | Water parameters monitoring on a cyberwater platform | |
JP2010277444A (en) | Monitoring system, monitoring device, and monitoring method | |
CN202815094U (en) | Grounding resistance analysis device | |
KR101262881B1 (en) | Voltage management methods and systems for performing analog-to-digital conversions | |
CN103487138A (en) | Mobile terminal having ultraviolet ray real-time detection function based on cloud service and method of mobile terminal | |
JP2012063801A (en) | Power generation capacity guaranteeing device for solar battery, method and computer program | |
CN208606800U (en) | Exhaust-gas treatment monitors system | |
US20170060882A1 (en) | Converting data sets in a shared communication environment | |
CN207780556U (en) | Danger source and environment monitoring warning system | |
CN112444325B (en) | Body temperature monitoring method and device, electronic equipment and storage medium | |
CN102546906A (en) | Mobile phone capable of detecting ambient temperature and providing voice control forecast |
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 |