A leakage current detection method and system based on digital phase-locked loop dynamic frequency modulation

By using a digital phase-locked loop (PLL) dynamic frequency modulation method, the frequency is adjusted using a single winding of a toroidal core and a digital PLL algorithm. This solves the problems of limited leakage current detection accuracy and insufficient anti-interference capability in existing technologies, achieving high-precision, adaptive leakage current detection with multiple fault diagnosis and protection functions.

CN123136170APending Publication Date: 2026-11-20FOSHAN CITY ZHONGYAN AMORPHOUS TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611260100.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-19
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing leakage current detection technology cannot adapt to the drift of the magnetic core operating point with temperature, aging and component parameters, thus limiting the detection accuracy. Furthermore, it lacks closed-loop stable control, making it difficult to ensure that the magnetic core always operates in the transition region where the permeability is most sensitive to the bias magnetic field.

Method used

A digital phase-locked loop (PLL) dynamic frequency modulation method is adopted. The frequency of the pulse excitation signal is adjusted by the PLL algorithm, the zero-crossing current is detected by a single winding of a toroidal core, and the phase difference is locked within the target range. The output frequency offset is used as a leakage current characterization quantity to achieve closed-loop control.

Benefits of technology

It improves leakage current detection accuracy, has strong anti-interference ability, can automatically track changes in the operating point of the magnetic core, reduces the drift effect caused by temperature and aging, has multiple fault diagnosis and protection functions, and has a simple structure and low cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123136170A_ABST
    Figure CN123136170A_ABST
Patent Text Reader

Abstract

The application relates to a leakage current detection method and system based on digital phase-locked loop dynamic frequency modulation, and relates to the technical field of electrical safety detection. When the leakage current detection is performed, a frequency-adjustable PWM excitation signal is output by a control unit, a digital phase-locked loop algorithm is run, an excitation signal is converted into an alternating excitation current by a driving circuit, and the single winding of a ring-shaped magnetic core is driven. Then, the current zero-crossing detection is performed in the excitation gap by using the single winding of the ring-shaped magnetic core, a winding current signal is output, so that independent detection of the winding is omitted, and the winding current signal is converted into a digital square wave by a signal conditioning circuit. Finally, the control unit runs the digital phase-locked loop algorithm, adjusts the excitation frequency of the excitation signal by using the digital square wave, locks the phase difference of the single winding of the ring-shaped magnetic core caused by external leakage current in a target range, and outputs a leakage current detection result for reflecting the amplitude of the leakage current. It can be seen that the embodiment of the application improves the leakage current detection precision relative to the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electrical safety testing technology, and in particular to a leakage current detection method and system based on digital phase-locked loop dynamic frequency modulation. Background Technology

[0002] Leakage current detection is a core technology for electrical safety protection. Especially in the field of electric vehicle charging stations, international standards (such as IEC 62752 and IEC 61851) require residual current devices (RCDs) to be able to detect AC, pulsating DC and smooth DC leakage current, i.e., Type B RCD requirements.

[0003] Existing leakage current detection technologies mainly include: traditional electromagnetic current transformers, Hall effect sensors, and magnetic modulation sensors. Traditional electromagnetic current transformers, based primarily on Faraday's law of electromagnetic induction, can only detect AC leakage current and cannot detect DC or pulsating DC leakage current. Hall effect sensors utilize the Hall effect to detect magnetic fields and can measure DC leakage current, but are susceptible to temperature drift, zero-point drift, and interference from external magnetic fields, resulting in poor long-term stability. Magnetic modulation sensors primarily utilize the nonlinear BH characteristics of soft magnetic materials to detect DC leakage current by detecting second harmonics or phase differences, and are currently one of the mainstream solutions for detecting DC leakage current.

[0004] However, the aforementioned existing technologies still have the following problems:

[0005] ① Existing magnetic modulation sensors typically use fixed-frequency excitation (such as 50Hz power frequency or fixed high frequency). This fixed-frequency operating mode has obvious limitations, as it cannot adapt to the drift of the magnetic core's operating point due to factors such as temperature, aging, and component parameter variations. Sensitivity is limited by the fixed operating frequency and cannot be dynamically optimized according to the actual operating point.

[0006] ② Traditional methods directly measure the open-loop phase difference or second harmonic amplitude as a characterization of leakage current. This approach has limitations in its measurement paradigm. Specifically, open-loop analog quantities are susceptible to temperature drift, power supply fluctuations, electromagnetic interference, and noise, limiting detection accuracy. Furthermore, it lacks a closed-loop stability control mechanism to ensure the magnetic core always operates within the target operating region (transition region).

[0007] ③ Some existing solutions focus on adjusting the excitation amplitude but do not address the dynamic optimization of the excitation frequency, resulting in insufficient adaptive capability and difficulty in ensuring that the magnetic core always operates in the transition region where the permeability is most sensitive to the bias magnetic field. Furthermore, temperature compensation often relies on table lookups or fixed coefficients, making it difficult to track the slow drift of core parameters and loop resistance. Summary of the Invention

[0008] This application provides a leakage current detection method and system based on dynamic frequency modulation of digital phase-locked loop. By keeping the operating point of the magnetic core in the target region (transition region) where the permeability is sensitive to bias, the leakage current information is converted into a closed-loop stable control quantity of digital phase-locked loop (PLL) - frequency offset. The leakage current detection accuracy and anti-interference ability are improved by utilizing the active suppression capability of the phase-locked loop for fast-changing noise within the bandwidth.

[0009] In a first aspect, this application provides a leakage current detection method based on dynamic frequency modulation using a digital phase-locked loop, applied to a leakage current detection system, comprising:

[0010] In the leakage current detection system, the pulse excitation signal output by the control unit is determined;

[0011] The pulse excitation signal is converted into an alternating excitation current by a driving circuit.

[0012] The alternating excitation current is used to drive a single winding of a toroidal magnetic core. Current zero-crossing detection is performed in the single winding of the toroidal magnetic core, and a winding current signal with a phase difference is output.

[0013] The winding current signal is converted into a digital square wave through a signal conditioning circuit.

[0014] In the control unit, based on the digital square wave, the excitation frequency of the pulse excitation signal is adjusted by a digital phase-locked loop algorithm to lock the phase difference and obtain the leakage current detection result.

[0015] Secondly, this application provides a leakage current detection system based on digital phase-locked loop dynamic frequency modulation, comprising:

[0016] The drive circuit is used to convert the pulse excitation signal output by the control unit into an alternating excitation current to drive the single winding of the toroidal magnetic core.

[0017] A single winding of a toroidal magnetic core is used for current zero-crossing detection and outputs a winding current signal with a phase difference.

[0018] A signal conditioning circuit is used to convert the winding current signal into a digital square wave;

[0019] The control unit is used to output a pulse excitation signal; based on the digital square wave, the excitation frequency of the pulse excitation signal is adjusted by a digital phase-locked loop algorithm to lock the phase difference and obtain the leakage current detection result.

[0020] In summary, the leakage current detection method based on dynamic frequency modulation using a digital phase-locked loop (PLL) proposed in this application can be applied to a corresponding leakage current detection system. This system may include at least a control unit, a drive circuit, a single winding of a toroidal core, and a signal conditioning circuit. During leakage current detection, the control unit outputs a frequency-adjustable PWM (pulse) excitation signal, runs a digital PLL algorithm, and performs temperature compensation and fault diagnosis. The drive circuit converts the PWM signal into an alternating excitation current to drive the single winding of the toroidal core. Subsequently, the single winding of the toroidal core simultaneously performs excitation and detection functions, using the same winding to perform zero-crossing detection during the excitation gap, outputting the winding current signal, thus eliminating the need for a separate detection winding. Next, the signal conditioning circuit converts the winding current signal into a digital square wave and sends it to the control unit. Finally, the control unit runs the digital PLL algorithm, using the digital square wave to adjust the excitation frequency of the PWM excitation signal, locking the phase difference of the single winding of the toroidal core caused by external leakage current within the target range, and simultaneously outputting the leakage current detection result reflecting the leakage current amplitude. As can be seen, the embodiments of this application improve the leakage current detection accuracy compared with the prior art. At the same time, the embodiments of this application utilize digital PLL dynamic frequency modulation to automatically track the changes in the magnetic core operating point, ensuring that the magnetic core always works in the leakage current sensitive transition region, avoiding the technical problem of decreased sensitivity caused by operating point drift in the prior art. Attached Figure Description

[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0022] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 A flowchart illustrating a leakage current detection method based on dynamic frequency modulation using a digital phase-locked loop provided in this application embodiment;

[0024] Figure 2 This is a flowchart of a digital phase-locked loop control algorithm provided in this application;

[0025] Figure 3 This is a schematic diagram of an H-bridge driver circuit provided in this application;

[0026] Figure 4 This is a schematic diagram of a signal conditioning circuit provided in this application;

[0027] Figure 5This is a schematic diagram of the frequency offset versus leakage current mapping curve provided in this application;

[0028] Figure 6 This is a structural block diagram of a leakage current detection system based on dynamic frequency modulation of a digital phase-locked loop, provided in an embodiment of this application. Detailed Implementation

[0029] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0030] To facilitate understanding of the embodiments of this application, further explanations and descriptions will be provided below in conjunction with the accompanying drawings and specific embodiments. These embodiments do not constitute a limitation on the embodiments of this application.

[0031] In practical implementation, the leakage current detection method based on dynamic frequency modulation of a digital phase-locked loop proposed in this application can also be understood as a leakage current detection method based on the phase detection principle or a leakage current detection method capable of dynamically adjusting the excitation frequency. This method can be applied to a leakage current detection system based on dynamic frequency modulation of a digital phase-locked loop. The leakage current detection system may include at least a control unit (such as an MCU control unit), a drive circuit (such as an H-bridge drive circuit), a single winding of a toroidal core, a signal conditioning circuit, etc., and may further include a temperature sensor and a protection circuit.

[0032] Understandably, this method / system is applicable not only to applications such as electric vehicle charging piles, photovoltaic inverters, and uninterruptible power supplies (UPS) that require the detection of leakage current containing DC components, but also to the detection of DC components of DC and pulsating DC leakage current. For pure AC leakage current detection requirements, it needs to be combined with traditional AC detection schemes to meet the full requirements of Type B RCD.

[0033] Figure 1 The flowchart illustrates a leakage current detection method based on dynamic frequency modulation using a digital phase-locked loop, as provided in this application embodiment. The method specifically includes the following steps:

[0034] Step 110: In the leakage current detection system, determine the pulse excitation signal output by the control unit.

[0035] Combination Figure 2As shown, the pulse excitation signal (PWM excitation signal) output by the MCU control unit in this embodiment can be a frequency-adjustable signal. The MCU control unit has a built-in digital phase-locked loop algorithm. By running the digital phase-locked loop algorithm, leakage current detection can be performed, and temperature compensation and fault diagnosis can also be performed.

[0036] Step 120: The pulse excitation signal is converted into an alternating excitation current by a driving circuit.

[0037] Step 130: Drive the single winding of the toroidal core using the alternating excitation current, perform current zero-crossing detection in the single winding of the toroidal core, and output a winding current signal with a phase difference.

[0038] A unified explanation of steps 120-130 is provided below:

[0039] This embodiment converts the PWM signal into an alternating excitation current using an H-bridge drive circuit, and then uses this alternating excitation current to drive a single winding of a toroidal core. Combined with... Figure 3 As shown, the H-bridge drive circuit can be composed of four transistors, forming an H-topology. Using a single winding of a toroidal core as the load, an alternating excitation current is generated under the complementary PWM control output by the MCU, driving the single winding of the toroidal core to magnetize.

[0040] Reference Figure 3 As shown, the toroidal core single winding can adopt a single core single winding structure. The winding simultaneously undertakes the excitation and detection functions, and the same winding is used for current zero-crossing detection during the excitation gap, eliminating the need for a separate detection winding. When there is external leakage current, the toroidal core single winding generates a magnetic field, which in turn generates a phase difference and outputs a winding current signal.

[0041] In one optional embodiment, the alternating excitation current is used to drive a single winding of a toroidal core, and current zero-crossing detection is performed in the single winding of the toroidal core to output a winding current signal. This includes: using the alternating excitation current to drive the single winding of the toroidal core to perform excitation and detection; for each excitation gap, using the single winding of the toroidal core to perform current zero-crossing detection to output a winding current signal with a phase difference.

[0042] Optionally, the above-mentioned method of using the single winding of the toroidal magnetic core for current zero-crossing detection and outputting a winding current signal with a phase difference may include: determining the external leakage current through current zero-crossing detection; when the external leakage current passes through the core window of the single winding of the toroidal magnetic core, the single winding of the toroidal magnetic core generates a DC bias magnetic field; under the DC bias magnetic field, the effective permeability of the core of the single winding of the toroidal magnetic core changes, thereby changing the phase difference of the target element and outputting a winding current signal.

[0043] Specifically, when external leakage current When the magnetic core window of a single-winding toroidal magnetic core is passed through, the single-winding toroidal magnetic core can generate a DC bias magnetic field. Under this DC bias magnetic field, the effective permeability of the magnetic core is... This change alters the phase difference of the target element in the winding, thus changing the inductance. and voltage-current phase difference The single winding of the toroidal magnetic core outputs the winding current signal.

[0044] As can be seen, the single-core, single-winding architecture used in this application for leakage current detection does not require a complex multi-winding or dual-core structure, resulting in low hardware cost and easy integration.

[0045] Step 140: The winding current signal is converted into a digital square wave through a signal conditioning circuit.

[0046] The signal conditioning circuit can acquire the winding current signal and convert it into a digital square wave, which is then output to the capture port of the MCU control unit. Combined with... Figure 4 As shown, the signal conditioning circuit mainly consists of a sampling resistor, an operational amplifier, and a zero-crossing comparator. Its processing of the winding current signal is as follows: sampling the winding current signal → in-phase proportional amplification → zero-crossing comparator shaping, and finally converting the winding current signal into a digital square wave that can be captured by the MCU.

[0047] Step 150: In the control unit, based on the digital square wave, the excitation frequency of the pulse excitation signal is adjusted by a digital phase-locked loop algorithm to lock the phase difference and obtain the leakage current detection result.

[0048] Unlike existing technologies, the core concept of this application is to transform leakage current detection into a closed-loop frequency control problem using a digital phase-locked loop (PLL), and to characterize the leakage current amplitude using frequency offset. Specifically, the MCU control unit can capture a digital square wave, and based on this digital square wave, adjust the excitation frequency of the PWM excitation signal (denoted as ) through the digital PLL. By adjusting the excitation frequency, the phase difference of a single winding of the toroidal core can be adjusted, locking the phase difference within the target range. The higher the leakage current, the higher the locking frequency, allowing the calculation of the offset of the locking frequency relative to the zero leakage current reference frequency, i.e., the frequency offset (denoted as ). This frequency offset can be understood as a characteristic output of the leakage current amplitude, and is used as the output of the leakage current detection result.

[0049] Therefore, unlike the traditional open-loop scheme that directly measures the phase difference, this application uses the phase difference as the feedback error signal of the digital phase-locked loop rather than the final measurement quantity, and uses the frequency offset as the leakage current characterization quantity output. It utilizes the active suppression capability of the digital phase-locked loop for fast-changing noise within the bandwidth to improve the detection accuracy.

[0050] Optionally, the above-mentioned method of adjusting the excitation frequency of the pulse excitation signal and locking the phase difference based on the digital square wave using a digital phase-locked loop algorithm to obtain the leakage current detection result may include the following sub-steps:

[0051] Sub-step 1501: Using the digital square wave, the excitation frequency of the pulse excitation signal is adjusted through a digital phase-locked loop algorithm to lock the phase difference within the target range.

[0052] Sub-step 1502: Continuously adjust the excitation frequency and lock the phase difference, and perform frequency correction according to temperature changes to obtain the frequency offset.

[0053] The frequency offset is used as the leakage current detection result and reflects the leakage current amplitude.

[0054] A unified explanation is provided for sub-steps 1501 and 1502:

[0055] In practical implementation, the target range can be set to 45°-60°, which corresponds to the transition region of the B-H curve of a single winding of a toroidal core (effective relative permeability). The effective permeability of the magnetic core in this region decreases monotonically with the DC bias magnetic field and is most sensitive to the bias. This is due to the phase difference. and It can calculate the effective permeability of the magnetic core. The phase difference from 500 to 1500 corresponds to approximately 45°-60°, which confines the core's operating point to the middle of the transition region, balancing sensitivity and anti-saturation margin.

[0056] Existing technologies often rely on table lookups or fixed coefficients for temperature compensation, making it difficult to track the slow drift of core parameters and loop resistance. This application fully considers real-time temperature changes and utilizes a temperature sensor to detect the real-time temperature (denoted as ) in the frequency offset calculation. Frequency correction is performed using temperature to calculate the frequency offset. Specifically, the zero-leakage reference frequency (i.e., the reference frequency) is first corrected using temperature. Then, the reference frequency is combined with the adjusted excitation frequency, and the frequency offset is calculated using the following formula. :

[0057]

[0058] As can be seen, this application establishes a closed-loop feedback loop in the closed-loop frequency control of the digital phase-locked loop: Changes Changes Changes Changes Deviation from target → MCU adjustment -> Relock -> Change the output of the detection results.

[0059] In one optional embodiment, frequency correction based on temperature changes to obtain a frequency offset may include: acquiring real-time temperature collected by a temperature sensor; analyzing compensation information based on the real-time temperature and a preset compensation table; and calculating the frequency offset based on the compensation information and the excitation frequency.

[0060] Optionally, in this embodiment, when the compensation information includes a reference frequency and a sensitivity coefficient, the above-mentioned analysis of the compensation information based on the real-time temperature and a preset compensation table may specifically include: fitting the frequency and sensitivity in the compensation table based on the real-time temperature to obtain a zero-leakage current reference frequency and a sensitivity coefficient; estimating the leakage current amplitude based on the sensitivity coefficient; and using the reference frequency to perform drift elimination based on the excitation frequency to obtain the frequency offset.

[0061] Combination Figure 5 As shown, the MCU control unit can acquire real-time temperature via a temperature sensor. Based on this real-time temperature, a lookup table is performed using a pre-established compensation table to correct the zero-leakage current reference frequency according to the lookup data. At the same time, the sensitivity coefficient is corrected (denoted as...). The two are combined to form compensation information. The compensation table can be arranged according to... Figure 5 The frequency offset versus leakage current mapping curve shown indicates that the compensation table consists of two tables, simultaneously compensating for... and ,eliminate Drift error.

[0062] Simultaneously, a reference frequency is introduced. and sensitivity coefficient As input, in the aforementioned Based on, according to Estimate the leakage current amplitude. Compensate only. Unable to eliminate Drift error requires the creation of two compensation tables simultaneously.

[0063] Therefore, this application achieves resistance to slow drift. Through temperature compensation and periodic self-calibration, it reduces the measurement error caused by the drift of slowly changing parameters such as temperature and aging. The temperature compensation also includes a zero leakage current reference frequency and a sensitivity coefficient, so as to solve the technical problem of slow drift of core parameters and loop resistance in the prior art.

[0064] As an example, let's take an STM32F4 series MCU control unit, a toroidal core with a single winding made of ferrite material, and an H-bridge drive voltage of 5V. The MCU outputs a complementary PWM square wave with an initial frequency of 8kHz to excite the toroidal core's single winding (which can be combined with...). Figure 3 (As shown). The signal conditioning circuit captures the current zero-crossing point and calculates the phase difference. The digital PLL locks the phase difference within the target range through frequency adjustment (see the aforementioned embodiment), with an adjustable frequency range of 1kHz-50kHz. The reference frequency and sensitivity coefficient are obtained from a table based on the temperature collected by the temperature sensor, and the leakage current amplitude is calculated.

[0065] In an optional embodiment, after obtaining the leakage current detection result, the method further includes: performing anomaly detection on each piece of hardware in the leakage current detection system to obtain hardware detection information; and detecting changes in the state and frequency of the phase-locked loop during the execution of the digital phase-locked loop algorithm to obtain phase-locked loop detection information; and performing protection operations through a protection circuit when the hardware detection information indicates a hardware anomaly, and / or when the phase-locked loop detection information indicates a detection anomaly.

[0066] Given that existing technologies have insufficient safety considerations and lack a safety degradation mechanism for detection circuit failures (such as PLL lockout, signal loss, and temperature sensor malfunction), failures cannot be detected and handled in a timely manner, posing safety hazards.

[0067] This application further introduces a fault diagnosis process, in which protective actions are executed when a fault is detected. Specifically, the system can be equipped with a protection circuit. When the MCU detects a hardware fault (such as a temperature sensor fault), or detects abnormal changes in the phase-locked loop state and frequency (such as PLL unlocking, frequency exceeding limits, abnormal frequency change rate, signal loss, etc.), the MCU outputs a protection trigger signal for any of the abnormalities. Upon receiving the protection trigger signal, the protection circuit executes a protection action, such as disconnecting the protected circuit and triggering an alarm.

[0068] Therefore, this application improves security. This application has multiple diagnostic and protection functions such as PLL unlocking, frequency overrun, abnormal frequency change rate, signal loss, and temperature sensor failure. In case of abnormality, it can cut off the protected circuit and alarm in time.

[0069] In a specific implementation, before using the compensation table for compensation correction, this application can pre-construct relevant benchmarks to form a compensation table. Optionally, it also includes: recording initial reference frequencies at different temperature points under zero leakage current conditions; based on the initial reference frequencies, injecting the locking frequency corresponding to the leakage current, and fitting an initial sensitivity coefficient; and establishing a compensation table for determining the leakage current detection results based on the initial reference frequencies and the initial sensitivity coefficients.

[0070] Optionally, this application further includes: self-calibrating the leakage current detection system in a state without leakage current to determine the drift information of the initial reference frequency; and updating the compensation table based on the drift information.

[0071] In practical implementation, to improve the accuracy of temperature compensation, a high-precision compensation table can be pre-established. This table is obtained by fitting relevant parameters under a reference state. For calibration and temperature compensation, the reference frequency at different temperature points can be recorded under zero leakage current conditions. Then, a known unidirectional leakage current is injected to record the locking frequency, and the sensitivity coefficient is obtained by fitting. Based on the measured relevant parameters, a formula can be formed as follows: Figure 4 The relationship curves shown are further used to construct a reference frequency compensation table and a sensitivity coefficient compensation table.

[0072] Furthermore, considering the potential aging of system components, this embodiment performs aging compensation based on the established compensation table. Specifically, self-calibration can be performed periodically under no leakage current conditions to determine drift information. If the reference frequency drift exceeds a certain range (e.g., ±5%), the compensation table is updated; if it exceeds ±15%, a maintenance alarm is triggered.

[0073] As can be seen, the embodiments of this application improve the leakage current detection principle, changing the leakage current detection in the prior art from open-loop analog quantity measurement to phase-locked loop closed-loop frequency control. Most existing technologies use the second harmonic amplitude or open-loop phase difference as the leakage current characterization quantity, and these analog quantities are highly sensitive to noise, temperature drift, and power supply fluctuations. This application uses the voltage-current phase difference as the feedback error signal of the digital phase-locked loop, and uses the difference between the excitation frequency output by the phase-locked loop and the zero leakage current reference frequency, i.e., the frequency offset, as the leakage current characterization quantity output. This enables the system to actively suppress fast-changing noise and interference within the bandwidth, thereby improving detection accuracy and anti-interference capability. This technical feature is manifested at the system level as the MCU control unit running a digital PLL control algorithm, and at the method level as a closed-loop control step of detecting the phase difference -> adjusting the frequency -> output. Therefore, this application has the following beneficial effects:

[0074] 1. High detection accuracy: The leakage current is mapped to the PLL closed-loop control quantity - frequency offset, which has the ability to actively suppress fast-changing disturbances such as phase noise, power fluctuations, and electromagnetic interference within the bandwidth. The detection accuracy is better than that of open-loop measurement schemes.

[0075] 2. Adaptive operating point: The digital PLL dynamic frequency adjustment can automatically track the changes in the operating point of the magnetic core, ensuring that the magnetic core always works in the leakage current sensitive transition region, avoiding the decrease in sensitivity caused by the operating point drift of the fixed frequency scheme.

[0076] 3. Anti-slow drift: Through temperature compensation and periodic self-calibration, the measurement error caused by the drift of slowly changing parameters such as temperature and aging is reduced;

[0077] 4. High safety: It has multiple diagnostic and protection functions such as PLL unlocking, frequency over-limit, abnormal frequency change rate, signal loss, and temperature sensor failure. In case of abnormality, it can cut off the protected circuit and alarm in time.

[0078] 5. Simple structure and low cost: It adopts a single magnetic core and single winding architecture, eliminating the need for complex multi-winding or dual magnetic core structures, resulting in low hardware costs and easy integration.

[0079] It should be noted that, for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should know that the embodiments of this application are not limited to the described order of actions, because according to the embodiments of this application, some steps may be performed in other orders or simultaneously.

[0080] like Figure 6 As shown in the figure, this application embodiment also provides a leakage current detection system based on digital phase-locked loop dynamic frequency modulation, including:

[0081] The drive circuit is used to convert the pulse excitation signal output by the control unit into an alternating excitation current to drive the single winding of the toroidal magnetic core.

[0082] A single winding of a toroidal magnetic core is used for current zero-crossing detection and outputs a winding current signal with a phase difference.

[0083] A signal conditioning circuit is used to convert the winding current signal into a digital square wave;

[0084] The control unit is used to output a pulse excitation signal; based on the digital square wave, the excitation frequency of the pulse excitation signal is adjusted by a digital phase-locked loop algorithm to lock the phase difference and obtain the leakage current detection result.

[0085] Reference Figure 6 As shown, the driving circuit can be an H-bridge driving circuit, and the control unit can be an MCU control unit; to achieve temperature compensation and circuit protection, the leakage current detection system can also include a temperature sensor and a protection circuit.

[0086] It should be noted that the leakage current detection system based on dynamic frequency modulation of digital phase-locked loop provided in the embodiments of this application can execute the leakage current detection method based on dynamic frequency modulation of digital phase-locked loop provided in any embodiment of this application, and has the corresponding functions and beneficial effects of the execution method.

[0087] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0088] The above description is merely a specific embodiment of this application, enabling those skilled in the art to understand or implement this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A leakage current detection method based on dynamic frequency modulation using a digital phase-locked loop, characterized in that, Applications include leakage current detection systems, including: In the leakage current detection system, the pulse excitation signal output by the control unit is determined; The pulse excitation signal is converted into an alternating excitation current by a driving circuit. The alternating excitation current is used to drive a single winding of a toroidal magnetic core. Current zero-crossing detection is performed in the single winding of the toroidal magnetic core, and a winding current signal with a phase difference is output. The winding current signal is converted into a digital square wave through a signal conditioning circuit. In the control unit, based on the digital square wave, the excitation frequency of the pulse excitation signal is adjusted by a digital phase-locked loop algorithm to lock the phase difference and obtain the leakage current detection result.

2. The method according to claim 1, characterized in that, The alternating excitation current drives a single winding of a toroidal magnetic core. Zero-crossing detection is performed on the single winding of the toroidal magnetic core, and a winding current signal is output, including: The alternating excitation current is used to drive a single winding of a toroidal magnetic core to perform excitation and detection. For each excitation gap, the zero-crossing current is detected using a single winding of the toroidal core, and a winding current signal with a phase difference is output.

3. The method according to claim 2, characterized in that, Using the single winding of the toroidal magnetic core for current zero-crossing detection, and outputting a winding current signal with a phase difference, includes: External leakage current is determined by zero-crossing current detection; When the external leakage current passes through the core window of the single winding of the toroidal core, the single winding of the toroidal core generates a DC bias magnetic field. Under the DC bias magnetic field, the effective permeability of the single winding of the toroidal magnetic core changes, thereby altering the phase difference of the target element and outputting the winding current signal.

4. The method according to claim 1, characterized in that, Based on the digital square wave, the excitation frequency of the pulse excitation signal is adjusted using a digital phase-locked loop algorithm to lock the phase difference, thereby obtaining the leakage current detection result, including: Using the digital square wave, the excitation frequency of the pulse excitation signal is adjusted through a digital phase-locked loop algorithm to lock the phase difference within the target range; The excitation frequency is continuously adjusted and the phase difference is locked. Frequency correction is performed according to temperature changes to obtain frequency offset. The frequency offset is used as the leakage current detection result and reflects the leakage current amplitude.

5. The method according to claim 4, characterized in that, Frequency correction is performed based on temperature changes to obtain the frequency offset, including: The real-time temperature collected by the temperature sensor is obtained, and the compensation information is analyzed based on the real-time temperature and a preset compensation table. Based on the compensation information and the excitation frequency, the frequency offset is calculated.

6. The method according to claim 5, characterized in that, The compensation information includes a reference frequency and a sensitivity coefficient. Based on the real-time temperature and a preset compensation table, the compensation information is analyzed, including: Based on the real-time temperature, the frequency and sensitivity are fitted in the compensation table to obtain the zero-leakage current reference frequency and sensitivity coefficient. The leakage current amplitude is estimated based on the sensitivity coefficient, and the frequency offset is obtained by using the reference frequency and performing drift elimination based on the excitation frequency.

7. The method according to any one of claims 1-6, characterized in that, After obtaining the leakage current detection results, the following is also included: Anomaly detection is performed on each piece of hardware in the leakage current detection system to obtain hardware detection information. In addition, during the execution of the digital phase-locked loop algorithm, the phase-locked loop state and frequency changes are detected to obtain phase-locked loop detection information. When the hardware detection information indicates a hardware malfunction, and / or when the phase-locked loop detection information indicates a detection malfunction, a protection operation is performed through the protection circuit.

8. The method according to any one of claims 1-6, characterized in that, Also includes: Record the initial reference frequency at different temperature points under zero leakage current conditions; Based on the initial reference frequency, the initial sensitivity coefficient is obtained by fitting the locking frequency corresponding to the injected leakage current. A compensation table is established based on the initial reference frequency and the initial sensitivity coefficient to determine the leakage current detection results.

9. The method according to claim 8, characterized in that, Also includes: In the absence of leakage current, the leakage current detection system is self-calibrated to determine the drift information of the initial reference frequency; The compensation table is updated based on the drift information.

10. A leakage current detection system based on dynamic frequency modulation using a digital phase-locked loop, characterized in that, include: The drive circuit is used to convert the pulse excitation signal output by the control unit into an alternating excitation current to drive the single winding of the toroidal magnetic core. A single winding of a toroidal magnetic core is used for current zero-crossing detection and outputs a winding current signal with a phase difference. A signal conditioning circuit is used to convert the winding current signal into a digital square wave; The control unit is used to output a pulse excitation signal; based on the digital square wave, the excitation frequency of the pulse excitation signal is adjusted by a digital phase-locked loop algorithm to lock the phase difference and obtain the leakage current detection result.