Electric leakage detection method, electric leakage detection device and power supply equipment
Patent Information
- Application Number
- CN202610572816.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-27
- Publication Date
- 2026-08-18
AI Technical Summary
然而该类方法对低幅值漏电波形检测能力不足
[0018] Compared with existing technologies, this application has the following advantages: By comparing the absolute value of the initial filter value with the absolute value of the DC filter value, the signal trend change can be determined. Based on this, by accumulating the continuous signal change trend under continuous sampling using the first marker value, different first and second coefficients are used as corresponding dynamic coefficients for the AC signal trend and the DC signal trend. The initial filter value is then processed according to the dynamic coefficients, thereby filtering out interference signals with high DC components, resulting in more accurate DC and AC filter values, thus improving the accuracy of leakage current detection and anti-interference capability.
Smart Images

Figure CN122592262A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of leakage current detection technology, and in particular to a leakage current detection method, a leakage current detection device, and a power supply equipment. Background Technology
[0002] In some related technologies, Type B residual current devices (RCDs) employ a low-cost MCU (Microcontroller Unit) with a built-in ADC (Analog-to-Digital Converter) to perform simple threshold judgments on the sampled voltage waveform to distinguish between AC and DC leakage signals. However, this method is insufficient for detecting low-amplitude leakage waveforms. For example, in scenarios with weak leakage currents of 3mA to 6mA, the simple minimum value judgment method may fail to distinguish slowly changing signals close to DC, thus posing a risk of missed detection. Furthermore, this type of method has weak anti-interference capabilities. For instance, during the sampling process, it is susceptible to external common-mode interference, power supply noise, and EMC (Electromagnetic Compatibility) interference, which can easily lead to false positives.
[0003] Therefore, there is an urgent need for a leakage current detection method that can effectively resist interference and accurately identify leakage current faults. Summary of the Invention
[0004] The technical problem to be solved by this application is to provide a leakage current detection method, leakage current detection device and power supply equipment, which can improve the anti-interference ability and the accuracy of leakage current fault identification.
[0005] To address the aforementioned technical problems, this application provides a leakage current detection method, comprising: step a, setting the current filter output value to an initial filter output value, a first marker value to an initial marker value, and a second marker value to a first numerical value; step b, acquiring the sampled raw value corresponding to the target device through a fluxgate sensor; step c, preprocessing the sampled raw value to obtain an initial filter value; step d, determining whether the absolute value of the current filter output value is greater than the absolute value of the initial filter value; if the determination result is yes, incrementing the first marker value by 1; if the determination result is no, decrementing the first marker value by 1; step e, updating the second marker value according to the first marker value. In step f, the second marker value is either the first value or the second value, and the first value and the second value are not equal; in step g, the dynamic coefficient is determined based on the second marker value, the current filter output value, and the initial filter value, and the dynamic coefficient is either the first coefficient or the second coefficient, and the first coefficient and the second coefficient are not equal; in step g, the DC filter value is determined based on the dynamic coefficient, the initial filter value, and the current filter output value, and the DC filter value is used as the current filter output value; in step h, the AC filter value is obtained based on the sampled original value and the DC filter value; in step i, the first leakage current detection result is determined based on the DC filter value and / or the AC filter value, and step b is continued.
[0006] Optionally, step b further includes: acquiring high-level sampling data and low-level sampling data corresponding to the target device through a fluxgate sensor, wherein the high-level sampling data includes multiple high-level sampling values and the low-level sampling data includes multiple low-level sampling values; filtering the multiple high-level sampling values to obtain high-level filtered values; filtering the multiple low-level sampling values to obtain low-level filtered values; and obtaining the original sampling values based on the high-level filtered values and the low-level filtered values.
[0007] Optionally, step b further includes: acquiring high-level sampling data and low-level sampling data corresponding to the target device through a fluxgate sensor, wherein the high-level sampling data includes a high-level sampling value and the low-level sampling data includes a low-level sampling value; and obtaining the original sampling value based on the high-level sampling value and the low-level sampling value.
[0008] Optionally, the leakage current detection method further includes: if the first trigger count is greater than the first threshold, then a leakage current alarm is used as the second leakage current detection result, wherein the first trigger count is the number of times the value in the high-level sampled data is greater than the preset high-level voltage threshold within a preset time period; and / or if the second trigger count is greater than the second threshold, then a leakage current alarm is used as the second leakage current detection result, wherein the second trigger count is the number of times the value in the low-level sampled data is greater than the preset low-level voltage threshold within a preset time period.
[0009] Optionally, step c further includes: performing zero-point correction on the original sampled value to obtain a zero-point corrected value; and processing the zero-point corrected value through a first-order Butterworth filter to obtain an initial filtered value.
[0010] Optionally, the leakage current detection method further includes: if the third trigger count is greater than the third trigger count threshold, then the leakage current alarm is taken as the third leakage current detection result, wherein the third trigger count is the number of times the zero-point correction value is greater than the preset zero-point correction threshold within a preset time period.
[0011] Optionally, step e further includes: if the first marker value is greater than the first threshold, then the second marker value is set to the second value; if the first marker value is less than the second threshold, then the second marker value is set to the first value, wherein the first threshold is greater than the second threshold.
[0012] Optionally, step f further includes: if the second marker value is a first value, then the dynamic coefficient is the first coefficient; if the second marker value is a second value, and the absolute value of the current filtered output value is greater than the initial filtered value, then the dynamic coefficient is the second coefficient; if the second marker value is a second value, and the absolute value of the current filtered output value is not greater than the initial filtered value, then the dynamic coefficient is the first coefficient.
[0013] Optionally, if the first coefficient is less than the second coefficient, the expression for calculating the DC filter value in step g is: In the formula This is the DC filter value. For dynamic coefficients, The initial filter value, This is the current filtered output value.
[0014] Optionally, step h further includes: obtaining the AC component value based on the original sampled value and the DC filtered value; and performing squaring and second-order Bessel filtering on the AC component value to obtain the AC filtered value.
[0015] Optionally, step i further includes: if the DC filter value is greater than a preset DC filter threshold, then the leakage current alarm is taken as the first leakage current detection result; and / or if the AC filter value is greater than a preset AC filter threshold, then the leakage current alarm is taken as the first leakage current detection result.
[0016] To address the aforementioned technical problems, this application provides a leakage current detection device, comprising: an initialization unit configured to set the current filter output value to an initial filter output value, a first marker value to an initial marker value, and a second marker value to a first numerical value; a data acquisition unit including a fluxgate sensor element configured to acquire the sampled raw value corresponding to the target device through the fluxgate sensor element; and a data processing unit configured to: receive the sampled raw value sent by the data acquisition unit; preprocess the sampled raw value to obtain an initial filter value; determine whether the absolute value of the current filter output value is greater than the absolute value of the initial filter value, and if the determination result is yes, The first marker value is incremented by 1; if the judgment result is negative, the first marker value is decremented by 1. The second marker value is updated based on the first marker value, where the second marker value is either the first value or the second value, and the first value and the second value are not equal. The dynamic coefficient is determined based on the second marker value, the current filter output value, and the initial filter value, where the dynamic coefficient is either the first coefficient or the second coefficient, and the first coefficient and the second coefficient are not equal. The DC filter value is determined based on the dynamic coefficient, the initial filter value, and the current filter output value, and the DC filter value is used as the current filter output value. The AC filter value is obtained based on the sampled original value and the DC filter value. The first leakage current detection result is determined based on the DC filter value and / or the AC filter value.
[0017] To address the aforementioned technical problems, this application provides a power supply device, comprising: a power supply unit configured to supply power to an electrical device; and the aforementioned leakage current detection device configured to generate a comprehensive leakage current detection result corresponding to the power supply unit, wherein the comprehensive leakage current detection result includes a first leakage current detection result.
[0018] Compared with existing technologies, this application has the following advantages: By comparing the absolute value of the initial filter value with the absolute value of the DC filter value, the signal trend change can be determined. Based on this, by accumulating the continuous signal change trend under continuous sampling using the first marker value, different first and second coefficients are used as corresponding dynamic coefficients for the AC signal trend and the DC signal trend. The initial filter value is then processed according to the dynamic coefficients, thereby filtering out interference signals with high DC components, resulting in more accurate DC and AC filter values, thus improving the accuracy of leakage current detection and anti-interference capability. Attached Figure Description
[0019] The accompanying drawings are included to provide a further understanding of this application; they are incorporated into and constitute a part of this application. The drawings illustrate embodiments of this application and, together with this specification, serve to explain the principles of this application. In the drawings: Figure 1 This is a schematic flowchart of a leakage current detection method according to an embodiment of this application; Figure 2 yes Figure 1 A flowchart illustrating the sub-steps of step S102; Figure 3 This is a flowchart illustrating a sub-step of step S102 in another embodiment of this application; Figure 4 yes Figure 1 A flowchart illustrating the sub-steps of step S105. Figure 5 yes Figure 1 A flowchart illustrating the sub-steps of step S108; Figure 6 yes Figure 1 A flowchart illustrating the sub-steps of step S109; Figure 7 This is a schematic diagram of a leakage current waveform containing a high DC component; Figure 8 By using conventional filtering and leakage current detection methods respectively Figure 7 A schematic diagram of the curve corresponding to the filter value of the wastepaper basket obtained after filtering the leakage current waveform. Figure 9 yes Figure 1 A flowchart illustrating the sub-steps of step S111. Figure 10 yes Figure 1 A flowchart illustrating the sub-steps of step S112; Figure 11 This is a block diagram of a leakage current detection device according to an embodiment of this application; and Figure 12 This is a block diagram of a power supply device according to an embodiment of this application. Detailed Implementation
[0020] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are merely some examples or embodiments of this application. For those skilled in the art, these drawings can be applied to other similar scenarios without creative effort. Unless obvious from the context or otherwise specified, the same reference numerals in the drawings represent the same structures or operations.
[0021] As indicated in this application and claims, unless the context clearly indicates otherwise, the words "a," "an," "an," and / or "the" are not specifically singular and may include plural forms. Generally speaking, the terms "comprising" and "including" only indicate the inclusion of explicitly identified steps and elements, which do not constitute an exclusive list, and the method or apparatus may also include other steps or elements.
[0022] Unless otherwise specifically stated, the relative arrangement, numerical expressions, and values of the components and steps described in these embodiments do not limit the scope of this application. It should also be understood that, for ease of description, the dimensions of the various parts shown in the drawings are not drawn to actual scale. Techniques, methods, and devices known to those skilled in the art may not be discussed in detail, but where appropriate, such techniques, methods, and devices should be considered part of the specification. In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not as limitations. Therefore, other examples of exemplary embodiments may have different values. It should be noted that similar reference numerals and letters in the following drawings denote similar items; therefore, once an item is defined in one drawing, it need not be further discussed in subsequent drawings.
[0023] Furthermore, it should be noted that the use of terms such as "first" and "second" to define components and / or data is merely for the purpose of distinguishing the corresponding components and / or data. Unless otherwise stated, these terms have no special meaning and therefore should not be construed as limiting the scope of protection of this application. In addition, although the terminology used in this application is selected from commonly known and used terms, some terms mentioned in this application's specification may have been chosen by the applicant according to his or her judgment, and their detailed meanings are explained in the relevant sections of the description herein. Moreover, this application should be understood not only by the actual terms used, but also by the meaning implied by each term.
[0024] It should be understood that when a component is referred to as "on another component," "connected to another component," "coupled to another component," or "in contact with another component," it can be directly on, connected to, coupled to, or in contact with that other component, or there may be an intervening component. In contrast, when a component is referred to as "directly on another component," "directly connected to," "directly coupled to," or "directly in contact with" another component, there is no intervening component. Similarly, when a first component is referred to as "electrically contacting" or "electrically coupled to" a second component, there is an electrical path between the first and second components that allows current to flow. This electrical path may include capacitors, coupled inductors, and / or other components that allow current to flow, even if there is no direct contact between the conductive components.
[0025] This application uses flowcharts to illustrate the operations performed by the methods according to embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed in exact order. Instead, various steps can be processed in reverse order or simultaneously. Furthermore, other operations may be added to these processes, or one or more operations may be removed from these processes.
[0026] Reference Figure 1 One embodiment of this application provides a leakage current detection method 100. In this embodiment, the leakage current detection method 100 is applicable to a leakage current detection device. The leakage current detection device includes a data processing unit and a fluxgate sensing element (e.g., a magnetic ring), and the data processing unit is adapted to execute the leakage current detection method 100. The leakage current detection method 100 of this embodiment can improve the anti-interference capability and leakage current detection accuracy of the leakage current detection device.
[0027] like Figure 1 As shown, the leakage current detection method 100 includes the following steps. Step S101 is to set the current filter output value to the initial filter output value, the first marker value to the initial marker value, and the second marker value to the first value. Specifically, in this embodiment, the initial filter output value is 0, and the initial marker value is 0. Step S102 is to obtain the original sampled value corresponding to the target device through a fluxgate sensor. Further refer to... Figure 2 Step S102 includes the following sub-steps. Step S1021 involves acquiring high-level sampling data and low-level sampling data corresponding to the target device through a fluxgate sensor. The high-level sampling data includes multiple high-level sampling values, and the low-level sampling data includes multiple low-level sampling values. Specifically, in this embodiment, a magnetic ring is used as the fluxgate sensor, and the line corresponding to the leakage current to be measured in the target device (e.g., neutral and live wires) passes through the magnetic ring. Based on this, the magnetic ring is excited by a PWM periodic signal, and continuous sampling is performed by an analog-to-digital converter to obtain the high-level sampling data corresponding to the high-level period of the PWM periodic signal and the low-level sampling data corresponding to the low-level period of the PWM periodic signal. In this embodiment, the analog-to-digital converter performs 8-point continuous sampling, so the corresponding high-level sampling data includes 8 high-level sampling values, and the corresponding low-level sampling data includes 8 low-level sampling values, thereby reducing the number of samplings and the amount of subsequent data processing while maintaining good sampling quality.
[0028] Continue to refer to Figure 2Step S1022 involves filtering multiple high-level sampled values to obtain a high-level filtered value. Specifically, in this embodiment, all high-level sampled values in the high-level sampled data are subjected to median filtering to obtain a high-level filtered value that suppresses spike noise and preserves edge characteristics. It should be noted that this application does not limit the filtering method in step S1022. In other embodiments, all high-level sampled values in the high-level sampled data are subjected to average filtering to obtain a high-level filtered value that reduces high-frequency random noise. Step S1023 involves filtering multiple low-level sampled values to obtain a low-level filtered value. Specifically, in this embodiment, all low-level sampled values in the low-level sampled data are subjected to median filtering to obtain a low-level filtered value that suppresses spike noise and preserves edge characteristics. It should be noted that this application does not limit the filtering method in step S1023. In other embodiments, all low-level sampled values in the low-level sampled data are subjected to average filtering to obtain a low-level filtered value that reduces high-frequency random noise. Step S1024 involves obtaining the original sampled value based on the high-level filtered value and the low-level filtered value. Specifically, in this embodiment, the average of the high-level filter value and the low-level filter value is used as the original sampling value.
[0029] It should be noted that this application does not limit the number of consecutive samples taken by the analog-to-digital converter (ADC). In some embodiments, the ADC performs two-point continuous sampling, in which case the corresponding high-level sampling data includes two high-level sample values, and the corresponding low-level sampling data includes two low-level sample values. In some embodiments, the ADC performs 16-point continuous sampling, in which case the corresponding high-level sampling data includes 16 high-level sample values, and the corresponding low-level sampling data includes 16 low-level sample values, thereby further improving the sampling quality. In some embodiments, the ADC performs one-point continuous sampling, in which case the high-level sampling data includes one high-level sample value, and the low-level sampling data includes one low-level sample value. Accordingly, refer to... Figure 3 Step S102 includes the following sub-steps. Step S1021' acquires the high-level sampling data and low-level sampling data corresponding to the target device through the fluxgate sensor. Step S1022' obtains the original sampling value based on the high-level sampling value and the low-level sampling value. Specifically, the average of the high-level sampling value and the low-level sampling value is used as the original sampling value.
[0030] Continue to refer to Figure 1Step S103 involves taking a leakage current alarm as the second leakage current detection result if the first trigger count is greater than the first threshold. The first trigger count is the number of times the value in the high-level sampled data within a preset time period exceeds a preset high-level voltage threshold. Step S104 involves taking a leakage current alarm as the second leakage current detection result if the second trigger count is greater than the second threshold. The second trigger count is the number of times the value in the low-level sampled data within a preset time period exceeds a preset low-level voltage threshold. In this embodiment, by calibrating the target device, the specific values corresponding to the first threshold, high-level voltage threshold, and preset time period in step S103, and the specific values corresponding to the second threshold, low-level voltage threshold, and preset time period in step S104, are determined when the target device has a large current leakage situation. This allows for the generation of accurate second leakage current detection results based on low-level and high-level sampled data for different target devices. It should be noted that the preset time period in step S103 and the preset time period in step S104 can be the same or different. Understandably, the values in the low-level sampled data are low-level sampled values, and correspondingly, the values in the high-level sampled data are high-level sampled values.
[0031] It should be noted that when the second leakage current detection result is a leakage current alarm, it indicates that the target device has a corresponding large current leakage. Correspondingly, if the first trigger count is not greater than the first threshold and the second trigger count is not greater than the second threshold, then the second current detection result is not a leakage current alarm, thus indicating that the target device does not have a corresponding large current leakage. Furthermore, this application does not limit the leakage detection method 100 to simultaneously include steps S103 and S104. In some embodiments, the leakage detection method 100 includes step S103 but not step S104, while in other embodiments, it includes step S104 but not step S103. This allows for targeted detection based on the characteristics of the target device, improving leakage detection accuracy while reducing data processing volume to improve response efficiency. In some embodiments, the leakage detection method 100 may not include steps S103 and S104, thereby reducing data processing volume and improving the response speed of subsequent necessary detection items.
[0032] Continue to refer to Figure 1 Step S105 involves preprocessing the original sampled values to obtain initial filtered values. Further refer to... Figure 4Step S105 includes the following sub-steps. Step S1051 involves zero-point correction of the original sampled value to obtain a zero-point correction value. Specifically, in this embodiment, the zero-point offset corresponding to the original sampled value is obtained by calibrating the target device. In step S1051, the zero-point offset is subtracted from the original sampled value to obtain the zero-point correction value. It is understood that zero-point correction in this embodiment can improve the accuracy of the sampled data, providing a reliable data foundation for subsequent data processing, thereby obtaining a more accurate leakage current detection result. Step S1052 processes the zero-point correction value using a first-order Butterworth filter to obtain an initial filtered value. In this embodiment, the first-order Butterworth filter can effectively remove high-frequency noise, thereby improving anti-interference performance. Furthermore, the fast response characteristics of the first-order Butterworth filter can improve the overall response speed of the leakage current detection method 100, achieving better real-time feedback.
[0033] Continue to refer to Figure 1 Step S106 involves setting a leakage current alarm as the third leakage current detection result if the third trigger count is greater than the third trigger threshold. The third trigger count is the number of times the zero-point correction value exceeds the preset zero-point correction threshold within a preset time period. In this embodiment, by calibrating the target device, the specific values corresponding to the third trigger threshold, zero-point correction threshold, and preset time period in step S106 are determined when the target device has a medium-current leakage condition. This allows for the generation of accurate third leakage current detection results based on the corresponding zero-point correction value for different target devices. It should be noted that when the third leakage current detection result is a leakage current alarm, it indicates that the target device has a corresponding medium-current leakage condition. Conversely, when the third trigger count is not greater than the third trigger threshold, the third current detection result is not a leakage current alarm, thus indicating that the target device does not have a corresponding medium-current leakage condition. It should be noted that this application does not limit the execution sequence of step S106; in other embodiments, step S106 can be executed immediately after step S1051. Furthermore, this application does not limit the execution of step S106. In some embodiments, the leakage current detection method 100 may exclude step S106, thereby reducing the amount of data processing and improving the response speed of subsequent necessary detection items.
[0034] Continue to refer to Figure 1 Step S107 determines whether the absolute value of the current filtered output value is greater than the absolute value of the initial filtered value. If the determination result is yes, the first flag value is incremented by 1; if the determination result is no, the first flag value is decremented by 1. Step 108 updates the second flag value based on the first flag value. The second flag value is either a first value or a second value, and the first value and the second value are not equal. Further details can be found in the following section. Figure 5Step 108 includes the following sub-steps. Step S1081 is to set the second marker value to a second value if the first marker value is greater than the first threshold. Step S1082 is to set the second marker value to a first value if the first marker value is less than the second threshold. The first threshold is greater than the second threshold. In this embodiment, by performing a calibration test on the target device, the specific values corresponding to the first threshold in step S1081 and the second threshold in step S1082 when the target device has a small current leakage condition are determined, thereby providing a reliable basis for subsequent processing for different target devices. For example, the first threshold is +8 and the second threshold is -8. It should be noted that in this embodiment, if the first marker value is not greater than the first threshold and the first marker value is not less than the second threshold, the second marker value remains unchanged, that is, the second marker value retains its previous value.
[0035] Continue to refer to Figure 1 Step S109 involves determining the dynamic coefficients based on the second marker value, the current filtered output value, and the initial filtered value. The dynamic coefficients are either the first coefficient or the second coefficient, and the first and second coefficients are not equal. Furthermore, in this embodiment, the first coefficient is less than the second coefficient. Further refer to... Figure 6 Step S109 includes the following sub-steps: Step S1091: If the second marker value is the first value, then the dynamic coefficient is the first coefficient. Step S1092: If the second marker value is the second value, and the absolute value of the current filtered output value is greater than the initial filtered value, then the dynamic coefficient is the second coefficient. Step S1093: If the second marker value is the second value, and the absolute value of the current filtered output value is not greater than the initial filtered value, then the dynamic coefficient is the first coefficient.
[0036] Continue to refer to Figure 1 Step S110 involves determining the DC filter value based on the dynamic coefficient, the initial filter value, and the current filter output value, and using the DC filter value as the current filter output value. It is understood that in this embodiment, the DC filter value obtained from the previous sampling process will be used as the current filter output value in the next sampling, thereby reflecting the signal trend changes during continuous sampling. The expression for calculating the DC filter value in this embodiment is: , In the formula This is the DC filter value. For dynamic coefficients, The initial filter value, This is the current filtered output value. In this embodiment, the second coefficient is approximately 10 times the first coefficient, thus enabling dynamic filtering based on the corresponding situation. It should be noted that this application does not limit the multiple relationship between the first and second coefficients. In other embodiments, the target device is calibrated, and the coefficient is adjusted based on the 10-fold ratio according to the calibration test results to ensure that the response time meets actual requirements.
[0037] Through steps S107 to S110, this embodiment proposes an asymmetric dynamic filtering algorithm based on trend judgment. This algorithm is used to process the initial filter value to obtain a DC filter value, thereby effectively suppressing leakage waveforms with high DC components. Specifically, in step S107, the absolute value of the initial filter value obtained in the current sampling round is compared with the absolute value of the DC filter value corresponding to the previous sampling round, i.e., the current filter output value, to determine the signal trend change. It can be understood that when the absolute value of the current filter output value is greater than the absolute value of the initial filter value, it indicates that the signal has a decreasing trend. Conversely, when the absolute value of the current filter output value is not greater than the absolute value of the initial filter value, it indicates that the signal has an increasing trend or is changing direction. Based on this, in step S107 of this embodiment, the first marker value is accumulated or subtracted accordingly, so that the first marker value can reflect the continuous changing trend of the signal corresponding to multiple consecutive samplings. Specifically, in this embodiment, step S108 determines that when the first marker value is greater than the first threshold, the current signal trend is characterized by continuous signal attenuation, and step S110 determines that when the first marker value is less than the second threshold, the current signal trend is characterized by continuous signal enhancement. It should be noted that in this embodiment, the continuous signal attenuation is further determined to be an AC signal trend. Accordingly, in this embodiment, step S109 determines the AC signal trend using a larger second coefficient as the dynamic coefficient, thereby enabling step S110 to filter the initial filter value in a way that provides a fast response and enhances sensitivity to signal changes, thus obtaining the corresponding DC filter value. Similarly, in this embodiment, the continuous signal enhancement is further determined to be a DC signal trend. Accordingly, in this embodiment, step S109 determines the DC signal trend using a smaller first coefficient as the dynamic coefficient, thereby enabling step S110 to filter the initial filter value in a way that provides a slow response and enhances steady-state capability, thus obtaining the corresponding DC filter value.
[0038] By performing steps S107 to S110 above, leakage current waveforms with high DC components can be effectively suppressed during the process of filtering the initial filter value to obtain the DC filter value. For example, refer to... Figure 7 and Figure 8 , Figure 7This is a schematic diagram of the leakage current waveform, i.e., the raw data, containing a high DC component. The horizontal axis represents time, and the vertical axis represents the current value, in mA. Correspondingly, Figure 8 Curve a represents the DC filtered value obtained after filtering the initial filter value using conventional filtering. Curve b represents the DC filtered value obtained after filtering the initial filter value using steps S107-S110. The horizontal axis represents time, and the vertical axis represents the current value in mA. It is evident that conventional filtering cannot effectively remove the DC component from the curve corresponding to the initial filter value, resulting in a relatively high current amplitude in the entire curve. This could lead to a false leakage current alarm triggered by curve a. In contrast, curve b has a lower current amplitude, indicating that the DC component has been effectively removed, thus avoiding false leakage current alarms and ensuring the reliability and accuracy of the DC filtered value.
[0039] Continue to refer to Figure 1 Step S111 involves obtaining the AC filter value based on the original sampled value and the DC filter value. Further refer to... Figure 9 Step S111 includes the following sub-steps. Step S1111 is to obtain the AC component value based on the original sampled value and the DC filtered value. Specifically, in this embodiment, the original sampled value is subtracted from the DC filtered value to obtain the AC component value. Step S1112 is to perform squaring and second-order Bessel filtering on the AC component value to obtain the AC filtered value. Specifically, in this embodiment, the AC component value is squared and second-order Bessel filtering sequentially to obtain the AC filtered value. It can be understood that by squaring the AC component value, the positive and negative polarities of the AC component value can be eliminated, and the result after squaring is proportional to the instantaneous power, thus the energy intensity can be reflected by the result after squaring. In addition, second-order Bessel filtering, while ensuring the filtering effect and signal fidelity, more realistically preserves the temporal shape and interrelationships of transient events in the signal, thereby obtaining a more reliable and accurate AC filtered value.
[0040] Continue to refer to Figure 1 Step S112 involves determining the first leakage current detection result based on the DC filter value and / or AC filter value, and then proceeding to step S102. Further reference... Figure 10Step S112 includes the following sub-steps. Step S1121 is to use a leakage current alarm as the first leakage current detection result if the DC filter value is greater than a preset DC filter threshold. Step S1122 is to use a leakage current alarm as the first leakage current detection result if the AC filter value is greater than a preset AC filter threshold. In this embodiment, by calibrating the target device, the specific values corresponding to the DC filter threshold in step S1121 and the AC filter threshold in step S1122 when the target device has a small current leakage are determined, thereby enabling the generation of an accurate first leakage current detection result based on the DC filter value and the AC filter value for different target devices.
[0041] It should be noted that when the first leakage current detection result is a leakage current alarm, it indicates that the target device has a corresponding small current leakage. Correspondingly, when the DC filter value is not greater than a preset DC filter threshold and the AC filter value is not greater than a preset AC filter threshold, the first current detection result is not a leakage current alarm, thus indicating that the target device does not have a corresponding small current leakage. Furthermore, this application does not limit the leakage detection method 100 to include both steps S1121 and S1122. In some embodiments, the leakage detection method 100 includes step S1121 but not step S1122, while in other embodiments, it includes step S1122 but not step S1121. This allows for targeted detection based on the characteristics of the target device, improving the accuracy of leakage detection while reducing data processing volume to improve response efficiency.
[0042] The leakage current detection method 100 in this embodiment obtains high-level sampling data, low-level sampling data, zero-point correction value, DC filter value, and AC filter value by sampling and processing the original values. Continuous monitoring of these parameters determines whether the target device experiences small-current, medium-current, or large-current leakage. This allows for comprehensive and accurate identification of leakage faults of varying degrees, improving the safety of the target device and the response speed to leakage faults, thus reducing the risk of injury to personnel or objects. Furthermore, the leakage current detection method 100 in this embodiment determines the signal change trend based on the initial filter value and DC filter value from multiple consecutive samplings. A first or second coefficient is then used as a dynamic coefficient to dynamically filter the initial filter value. This effectively filters out leakage waveforms with high DC components, avoiding false alarms for small-current leakage due to noise signals and significantly improving the accuracy of the first leakage current detection result.
[0043] Reference Figure 11 An embodiment of this application also proposes a leakage current detection device 200. For example... Figure 11As shown, the leakage current detection device 200 includes an initialization unit 21, a data acquisition unit 22, and a data processing unit 23. In this embodiment, the leakage current detection device 200 is a type B leakage current detection device. The initialization unit 21 is configured to set the current filter output value to the initial filter output value, the first flag value to the initial flag value, and the second flag value to the first value. The data acquisition unit 22 includes a fluxgate sensor element, and the data acquisition unit 22 is configured to acquire the original sampled value corresponding to the target device through the fluxgate sensor element. The data processing unit 23 is configured to: receive the sampled raw values sent by the data acquisition unit 22; preprocess the sampled raw values to obtain an initial filter value; determine whether the absolute value of the current filter output value is greater than the absolute value of the initial filter value; if the determination result is yes, increment the first flag value by 1; if the determination result is no, decrement the first flag value by 1; update the second flag value according to the first flag value, wherein the second flag value is either a first value or a second value, and the first value and the second value are not equal; determine the dynamic coefficient according to the second flag value, the current filter output value, and the initial filter value, wherein the dynamic coefficient is either a first coefficient or a second coefficient, and the first coefficient and the second coefficient are not equal; determine the DC filter value according to the dynamic coefficient, the initial filter value, and the current filter output value, and use the DC filter value as the current filter output value; obtain the AC filter value according to the sampled raw values and the DC filter value; and determine the first leakage current detection result according to the DC filter value and / or the AC filter value. In this embodiment, the data processing unit 23 includes a microcontroller, and the specific execution of the above configuration in the data processing unit 23 is implemented through the microcontroller. Understandably, the data acquisition unit 22 can periodically and continuously acquire the raw sampling values and send the acquired raw sampling values to the data processing unit 23 in the order of sampling time, so that the data processing unit 23 can continuously monitor the leakage current of the target device and continuously feed back the first leakage current detection result.
[0044] It should be noted that the specific method by which the data acquisition unit 22 acquires the original sampled values in this embodiment can be consistent with the specific method of step S102 in the leakage current detection method 100 of any of the above embodiments, and will not be repeated here. Furthermore, the specific configuration of the data processing unit 23 in this embodiment can be expanded with reference to the corresponding content in steps S103 to S112 of the leakage current detection method 100 of any of the above embodiments. For example, the specific implementation method of the data processing unit 23 in obtaining the AC filter value based on the original sampled values and the DC filter value is consistent with the specific execution step of step S111 in the leakage current detection method 100 of any of the above embodiments; the data processing unit 23 can further refer to steps S103 to S104 and step S106 of the leakage current detection method 100 of any of the above embodiments to add the determination of a second leakage current detection result and / or a third leakage current detection result.
[0045] In this embodiment, the data processing is executed by a microcontroller, and the dynamic coefficient is used to improve the filtering effect on leakage waveforms with high DC components, thereby improving anti-interference capability and enhancing the detection capability for small current leakage. Thus, the accuracy and reliability of leakage detection are improved using a low-cost microcontroller. Therefore, the leakage detection device 200 of this embodiment can improve the accuracy and reliability of leakage detection without improving hardware performance, hardware cost, or modifying hardware circuitry.
[0046] Reference Figure 12 One embodiment of this application also proposes a power supply device 300. In this embodiment, the power supply device 300 is a charging pile suitable for electric vehicles. It should be noted that this application does not limit the specific type of the power supply device 300; in some embodiments, the power supply device 300 can be a charging pile suitable for electric bicycles. Figure 12 As shown, the power supply device 300 includes a power supply unit 31 and a leakage current detection device 200 according to any of the above embodiments. The power supply unit 31 is configured to supply power to the electrical equipment. The leakage current detection device 200 is configured to generate a comprehensive leakage current detection result corresponding to the power supply unit 31. The comprehensive leakage current detection result includes a first leakage current detection result. It can be understood that in this embodiment, the leakage current detection device 200 obtains the original sampled value corresponding to the power supply unit 31 through the data acquisition unit 22. Furthermore, in this embodiment, the leakage current detection device 200 can be further configured to provide a second leakage current detection result and / or a third leakage current detection result. Correspondingly, the comprehensive leakage current detection result also includes the corresponding second leakage current detection result and / or third leakage current detection result. It should be noted that when the leakage current detection device 200 determines that at least one detection result in the comprehensive leakage current detection result (e.g., the first leakage current detection result) is a leakage current alarm, then the power supply unit 31 has a leakage current condition.
[0047] In this embodiment, the power supply device 300, by incorporating a leakage current detection device 200, can monitor the leakage current of the power supply device 31 in real time, thereby improving the reliability and safety of the power supply device 31. Furthermore, by setting a dynamic coefficient, the leakage current detection device 200 can improve the accuracy and reliability of leakage current detection without increasing hardware performance, hardware costs, or modifying hardware circuitry, thus balancing the safety, reliability, and cost of the power supply device 300.
[0048] The basic concepts have been described above. Obviously, for those skilled in the art, the above disclosure is merely illustrative and does not constitute a limitation of this application. Although not explicitly stated herein, those skilled in the art may make various modifications, improvements, and corrections to this application. Such modifications, improvements, and corrections are suggested in this application, and therefore remain within the spirit and scope of the exemplary embodiments of this application.
[0049] Furthermore, this application uses specific terms to describe embodiments of the application. For example, "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic related to at least one embodiment of the application. Therefore, it should be emphasized and noted that "an embodiment," "one embodiment," or "an alternative embodiment" mentioned twice or more in different locations in this specification do not necessarily refer to the same embodiment. In addition, certain features, structures, or characteristics in one or more embodiments of the application can be appropriately combined.
[0050] Similarly, it should be noted that, in order to simplify the description of the present application and thus aid in the understanding of one or more embodiments, the foregoing description of the embodiments of the present application sometimes combines multiple features into a single embodiment, drawing, or description thereof. However, this disclosure method does not imply that the subject matter of the present application requires more features than those mentioned in the claims. In fact, the embodiments contain fewer features than all the features of the single embodiments disclosed above.
[0051] In some embodiments, numbers describing the quantity of components and attributes are used. It should be understood that such numbers used in the description of embodiments are modified in some examples with the terms "approximately," "approximately," or "generally." Unless otherwise stated, "approximately," "approximately," or "generally" indicates that the numbers are allowed to vary by ±20%. Accordingly, in some embodiments, the numerical parameters used in the specification and claims are approximate values, which may be changed depending on the characteristics required by individual embodiments. In some embodiments, numerical parameters should take into account specified significant digits and employ a general method of digit reservation. Although the numerical ranges and parameters used to confirm their breadth of scope in some embodiments of this application are approximate values, in specific embodiments, such values are set as precisely as feasible.
[0052] Although this application has been described with reference to specific embodiments, those skilled in the art should recognize that the above embodiments are only used to illustrate this application, and various equivalent changes or substitutions can be made without departing from the spirit of this application. Therefore, any changes or modifications to the above embodiments within the essential spirit of this application will fall within the scope of the claims of this application.
Claims
1. A leakage current detection method, characterized in that, include: Step a: Set the current filter output value to the initial filter output value, the first flag value to the initial flag value, and the second flag value to the first value; Step b: Obtain the original sampled value corresponding to the target device through the fluxgate sensor element; Step c: Preprocess the original sampled values to obtain initial filtered values; Step d: Determine whether the absolute value of the current filtered output value is greater than the absolute value of the initial filtered value. If the determination result is yes, then the first flag value is incremented by 1; if the determination result is no, then the first flag value is decremented by 1. Step e: Update the second flag value according to the first flag value, wherein the second flag value is either the first value or the second value, and the first value and the second value are not equal; Step f: Determine dynamic coefficients based on the second marker value, the current filtered output value, and the initial filtered value, wherein the dynamic coefficients are either a first coefficient or a second coefficient, and the first coefficient and the second coefficient are not equal; Step g: Determine the DC filter value based on the dynamic coefficient, the initial filter value, and the current filter output value, and use the DC filter value as the current filter output value; Step h: Obtain the AC filter value based on the original sampled value and the DC filter value; Step i: Determine the first leakage current detection result based on the DC filter value and / or the AC filter value, and continue to execute step b.
2. The leakage current detection method as described in claim 1, characterized in that, Step b further includes: The high-level sampling data and low-level sampling data corresponding to the target device are obtained through the fluxgate sensing element, wherein the high-level sampling data includes multiple high-level sampling values and the low-level sampling data includes multiple low-level sampling values; Filter the multiple high-level sample values to obtain the high-level filtered value; Filter the multiple low-level sample values to obtain low-level filtered values; The original sampled value is obtained based on the high-level filter value and the low-level filter value.
3. The leakage current detection method as described in claim 1, characterized in that, Step b further includes: The high-level sampling data and low-level sampling data corresponding to the target device are obtained through the fluxgate sensing element, wherein the high-level sampling data includes a high-level sampling value and the low-level sampling data includes a low-level sampling value; The original sampled value is obtained based on the high-level sampled value and the low-level sampled value.
4. The leakage current detection method as described in claim 2 or 3, characterized in that, The leakage current detection method also includes: If the first trigger count is greater than the first threshold, then the leakage current alarm is taken as the second leakage current detection result, wherein the first trigger count is the number of times the value in the high-level sampled data is greater than a preset high-level voltage threshold within a preset time period; and / or If the second trigger count is greater than the second threshold, then the leakage current alarm will be used as the second leakage current detection result. The second trigger count is the number of times the value in the low-level sampling data is greater than the preset low-level voltage threshold within the preset time period.
5. The leakage current detection method as described in claim 1, characterized in that, Step c further includes: The original sampled values are zero-point corrected to obtain the zero-point corrected values; The zero-point correction value is processed by a first-order Butterworth filter to obtain the initial filtered value.
6. The leakage current detection method as described in claim 5, characterized in that, The leakage current detection method also includes: If the third trigger count is greater than the third trigger count threshold, then the leakage current alarm will be used as the third leakage current detection result. The third trigger count is the number of times the zero-point correction value is greater than the preset zero-point correction threshold within a preset time period.
7. The leakage current detection method as described in claim 1, characterized in that, Step e further includes: If the first marker value is greater than the first threshold, then the second marker value is set to the second value; If the first marker value is less than the second threshold, then the second marker value is set to the first value, wherein the first threshold is greater than the second threshold.
8. The leakage current detection method as described in claim 1, characterized in that, Step f further includes: If the second marker value is the first value, then the dynamic coefficient is the first coefficient; If the second flag value is the second numerical value, and the absolute value of the current filtered output value is greater than the initial filtered value, then the dynamic coefficient is the second coefficient; If the second flag value is the second numerical value, and the absolute value of the current filtered output value is not greater than the initial filtered value, then the dynamic coefficient is the first coefficient.
9. The leakage current detection method as described in claim 1, characterized in that, The first coefficient is less than the second coefficient. In step g, the expression for calculating the DC filter value is: , In the formula The DC filter value is... The dynamic coefficient is... The initial filter value is... This is the current filtered output value.
10. The leakage current detection method as described in claim 1, characterized in that, Step h further includes: The AC component value is obtained based on the original sampled value and the DC filtered value; The AC component value is squared and subjected to second-order Bessel filtering to obtain the AC filtered value.
11. The leakage current detection method as described in claim 1, characterized in that, Step i further includes: If the DC filter value is greater than the preset DC filter threshold, then a leakage current alarm will be used as the first leakage current detection result; and / or If the AC filter value is greater than the preset AC filter threshold, then the leakage current alarm will be used as the first leakage current detection result.
12. A leakage current detection device, characterized in that, include: An initialization unit is configured to set the current filter output value to an initial filter output value, the first flag value to an initial flag value, and the second flag value to a first numerical value; A data acquisition unit includes a fluxgate sensor element, wherein the data acquisition unit is configured to acquire the original sampled value corresponding to the target device through the fluxgate sensor element; Data processing unit, wherein, The data processing unit is configured as follows: Receive the original sampled values sent by the data acquisition unit; The original sampled values are preprocessed to obtain initial filtered values; Determine whether the absolute value of the current filtered output value is greater than the absolute value of the initial filtered value. If the determination result is yes, then the first flag value is incremented by 1; if the determination result is no, then the first flag value is decremented by 1. The second flag value is updated according to the first flag value, wherein the second flag value is either the first value or the second value, and the first value and the second value are not equal; The dynamic coefficient is determined based on the second marker value, the current filtered output value, and the initial filtered value, wherein the dynamic coefficient is either a first coefficient or a second coefficient, and the first coefficient and the second coefficient are not equal; The DC filter value is determined based on the dynamic coefficient, the initial filter value, and the current filter output value, and the DC filter value is used as the current filter output value. Based on the original sampled value and the DC filtered value, the AC filtered value is obtained; The first leakage current detection result is determined based on the DC filter value and / or the AC filter value.
13. A power supply device, characterized in that, include: A power supply device configured to supply power to electrical equipment; The leakage current detection device as described in claim 12 is configured to generate a comprehensive leakage current detection result corresponding to the power supply device, wherein... The comprehensive leakage current detection results include the first leakage current detection results.