A method for real-time calibration of power frequency zero-crossing point, computer equipment and storage medium

By combining the gray wolf algorithm and dynamic mean update method, real-time calibration of the zero crossing point of the power frequency is achieved, solving the shortcomings of traditional technology in accuracy and real-time, and improving the calibration accuracy and adaptability.

CN119881431BActive Publication Date: 2025-06-06SHANDONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510368341.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-03-27
Publication Date
2025-06-06
Estimated Expiration
2045-03-27

AI Technical Summary

Technical Problem

The traditional power frequency zero crossing calibration technology has shortcomings in accuracy and real-time performance, especially in disturbed power frequency signals, which are prone to multiple false zero crossings, resulting in large errors in the measurement results.

Method used

Real-time calibration of the zero-crossing point of the power frequency is used using the Gray Wolf algorithm and dynamic mean update method. First, the center zero crossing point in the initial zero crossing set is identified through the gray wolf algorithm, which is called the gray wolf crossing point. Then, by continuously detecting and recording the gray wolf zero crossing point in multiple power frequency cycles, dynamically update the estimated zero crossing time, improving calibration accuracy and real-timeness.

Benefits of technology

It improves the accuracy and real-timeness of zero crossing point recognition of power frequency, reduces zero crossing point calibration errors caused by signal interference or noise, has strong adaptability and small calculation amount.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119881431B_ABST
    Figure CN119881431B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of power frequency signal measurement, and discloses a real-time calibration method for power frequency zero crossing, a computer device and a storage medium. The method of the present invention is based on the Gray Wolf algorithm and the dynamic mean update method, and does not need to perform complex processing on the measured signal. First, the signal is obtained, and the optimal solution is effectively searched through the Gray Wolf algorithm, thereby improving the accuracy of zero crossing identification. However, there is still a certain error between the Gray Wolf zero crossing calculated by the Gray Wolf algorithm and the actual zero crossing; in response to this problem, the present invention further uses a method of real-time calibration of the power frequency zero crossing by a dynamic mean on the basis of the calculated Gray Wolf zero crossing, continuously detects and records the Gray Wolf zero crossings of the rising edge zero crossing stage of multiple power frequency cycles, and dynamically updates the estimated zero crossing occurrence time. This method not only improves the accuracy of zero crossing calibration, but also has high real-time performance and improves the adaptability to signal changes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of power frequency signal measurement, and in particular relates to a power frequency zero-crossing point real-time calibration method, a computer device and a storage medium. Background Art

[0002] The zero-crossing point refers to the moment when the amplitude of the AC signal is zero. For power-frequency signals, the zero-crossing point includes the rising edge zero-crossing point (phase is 0 degrees) and the falling edge zero-crossing point (phase is 180 degrees). When performing partial discharge (PD) detection on electrical equipment, it is often necessary to draw a phase-resolved partial discharge (PRPD) spectrum containing the phase information of the discharge signal, and calibrate the phase of the discharge signal by detecting the zero-crossing point of the power-frequency signal. In the field of communications, power-frequency wave distortion communication uses the power-frequency fundamental wave of the power grid as the carrier frequency and performs inverse baseband modulation at the zero-crossing moment. In addition, the frequency is calculated by measuring the time width of the signal waveform crossing the zero points successively, and the phase difference of the measured signal is calculated by calculating the zero-crossing time difference of two or more signals of the same frequency.

[0003] It can be seen that the application scope of zero-crossing calibration is very wide. Zero-crossing calibration is a technology that determines the phase and frequency of the signal by accurately identifying the moment when the signal waveform crosses the zero voltage level. By calibrating the zero-crossing point of the measured signal, the frequency, phase and other information of the signal can be obtained, and then a deeper analysis and understanding of the signal can be obtained. However, the actual power frequency signal is often affected by harmonics or noise interference, and multiple false zero crossings will be generated near the real zero crossing point, which brings large errors to the measurement results. Traditional power frequency zero-crossing calibration technology often relies on complex circuit structures for filtering. At the same time, there are problems such as large amount of calculation. In addition, the traditional power frequency zero-crossing calibration method still has room for improvement in accuracy and real-time performance. Summary of the invention

[0004] The purpose of the present invention is to propose a real-time calibration method for power frequency zero crossing, which performs real-time calibration for power frequency zero crossing based on the Grey Wolf algorithm and the dynamic mean update method, and has the advantages of simple algorithm, small calculation amount, high calibration accuracy and real-time performance.

[0005] In order to achieve the above object, the present invention adopts the following technical scheme:

[0006] A method for real-time calibration of power frequency zero-crossing point, characterized in that it comprises the following steps:

[0007] Step 1. First, the measured power frequency signal is reduced in voltage and compared with zero crossing, converted into a low-voltage square wave level signal, and then the transition point of the square wave signal is monitored; the power frequency signal contains interference, and the low-voltage square wave level signal will fluctuate at the transition edge;

[0008] Step 2. Identify the rising edge zero-crossing stage of the low-voltage square wave level signal through a preset time threshold, detect and record all zero-crossing points in the rising edge stage in real time, and generate a preliminary zero-crossing point set for each power frequency cycle;

[0009] The gray wolf algorithm is used to identify the central zero-crossing point in each preliminary zero-crossing point set, which is recorded as the gray wolf zero-crossing point;

[0010] Step 3. Preset the number of calibration samples and the number of calibration interval cycles;

[0011] Continuously detect and record the occurrence time of the gray wolf zero-crossing point of the preset calibration sample number and calculate the average value, and use the average value as the initial timing cycle; from the next rising edge zero-crossing stage to the end of the timing cycle is the estimated and calibrated zero-crossing point;

[0012] At the same time, after the calibration interval period has passed since the next rising edge zero crossing stage, the gray wolf zero crossing occurrence time of the latest preset calibration sample number detected continuously is used to recalculate the average value, and the above timing period is dynamically updated;

[0013] Repeat the above process, continue to estimate and calibrate the new zero-crossing point, until there is no more zero-crossing point to calibrate, then end.

[0014] In addition, based on the above-mentioned power frequency zero-crossing real-time calibration method, the present invention also proposes a computer device, which includes a memory and one or more processors. An executable code is stored in the memory. When the processor executes the executable code, it is used to implement the above-mentioned power frequency zero-crossing real-time calibration method.

[0015] In addition, based on the above-mentioned power frequency zero-crossing real-time calibration method, the present invention also proposes a computer-readable storage medium, on which a program is stored. When the program is executed by a processor, it is used to implement the above-mentioned power frequency zero-crossing real-time calibration method.

[0016] The present invention has the following advantages:

[0017] As described above, the present invention relates to a method for real-time calibration of power frequency zero crossings based on the gray wolf algorithm and the dynamic mean. The method does not require complex processing of the measured signal. First, the optimal solution is effectively searched by the gray wolf algorithm, thereby improving the accuracy of zero crossing identification. However, the gray wolf zero crossing calculated by the gray wolf algorithm and the actual zero crossing still have a certain error. In view of this problem, the present invention is based on the gray wolf zero crossing, and further uses the method of real-time calibration of the power frequency zero crossing by the dynamic mean, continuously detecting and recording the gray wolf zero crossings of the rising edge zero crossing stage of multiple power frequency cycles, and dynamically updating the estimated zero crossing occurrence time. This method not only improves the accuracy of zero crossing calibration, but also has high real-time performance, improves the adaptability to signal changes, and effectively overcomes the previous shortcomings. The power frequency zero crossing calibration method of the present invention does not require complex processing of the measured signal, the algorithm has a small amount of calculation, strong real-time performance, and high accuracy, and provides a new solution for the real-time calibration of the power frequency zero crossing. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 This is a working flow chart of the real-time calibration method for power frequency zero-crossing in Example 1 of the present invention;

[0019] Figure 2 This is a schematic diagram of the structure of the power frequency signal acquisition device in Embodiment 1 of the present invention;

[0020] Figure 3 Schematic diagram of comparison between the zero-crossing calibration signal and the square wave signal in Example 1 of the present invention;

[0021] Figure 4 This is a schematic diagram of a reference to a preset time threshold in Embodiment 1 of the present invention;

[0022] Figure 5 This is a schematic diagram of the zero-crossing calibration result in Example 1 of the present invention;

[0023] Figure 6 A flowchart of generating a preliminary zero-crossing point set in Embodiment 1 of the present invention;

[0024] Figure 7 Schematic diagram of the zero-crossing calibration result in Example 2 of the present invention. DETAILED DESCRIPTION

[0025] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments:

[0026] Example 1

[0027] like Figure 1 As shown, the real-time calibration method for power frequency zero crossing in this embodiment includes the following steps:

[0028] Step 1. First, the measured power frequency signal is stepped down and zero-crossed compared to convert it into a low-voltage square wave level signal. Then, the transition point of the square wave signal is monitored, the transition moments of the upper and lower edges are recorded, and a preliminary zero-crossing point set is generated.

[0029] Among them, the industrial frequency signal contains interference, so the low-voltage square wave level signal will fluctuate at the transition edge.

[0030] In order to generate a preliminary zero-crossing point set, the structure of the signal acquisition device used in this embodiment is as follows: Figure 2 As shown, the signal acquisition device includes a mutual inductor, an offset circuit, a comparison circuit, and an FPGA.

[0031] like Figure 2 As shown in the figure, the process of power frequency signal acquisition and preprocessing is as follows:

[0032] Step 1.1. Obtain the required industrial frequency signal from the mains socket, which is 220V AC.

[0033] Step 1.2. First, the power frequency input signal is stepped down by a transformer to obtain a low-voltage sinusoidal AC signal. Then, a DC component is superimposed on the stepped-down signal, i.e., the low-voltage sinusoidal AC signal, to transform it into a sinusoidal DC signal. Finally, it is converted into a low-voltage square wave level signal output by a comparison circuit. Figure 3 An actual square wave signal is shown.

[0034] Since the power frequency signal contains interference, the low-voltage square wave level signal will produce multiple zero crossing points on both the rising and falling edges.

[0035] In this embodiment, the low voltage sinusoidal AC signal is 1.2V-3.3V.

[0036] Step 1.3. Input the low-voltage square wave level signal into the FPGA, monitor the transition point of the low-voltage square wave level signal through a high-speed counter in the FPGA, record the transition time of the upper and lower edges, and generate a preliminary zero-crossing point set.

[0037] Step 2. Identify the rising edge zero-crossing stage of the low-voltage square wave level signal through a preset time threshold, detect and record all zero-crossing points in the rising edge stage in real time, and generate a preliminary zero-crossing point set for each power frequency cycle.

[0038] The gray wolf algorithm is used to identify the central zero-crossing point in each preliminary zero-crossing point set, which is recorded as the gray wolf zero-crossing point.

[0039] like Figure 6 As shown, the specific processing process of step 2 is as follows:

[0040] Step 2.1. Preset a time threshold for detecting whether it is in the zero-crossing phase.

[0041] like Figure 4 As shown, the preset time threshold is greater than the duration of a single zero-crossing stage and less than half of the power frequency cycle, so as to ensure that within each power frequency cycle, the threshold range can and only can cover a single zero-crossing stage.

[0042] For example, in Figure 4 In the definition of 0 is half of the power frequency cycle, which is about 10ms in practice; define t 1 The time for the rising edge to cross the zero point is about microseconds in practice. Therefore, the time threshold can be set to 1ms in this embodiment.

[0043] Step 2.2. Figure 3 As shown, when the level of the low voltage square wave level signal changes, timing starts from zero.

[0044] Step 2.3. If the level changes again before the timing time starting from zero reaches the time threshold (for example, 1ms), the low-voltage square wave level signal is at the zero-crossing stage, and then the actual change of the level is further determined.

[0045] If the level does not change when the timing time reaches the time threshold, it is a stable level, and the process returns to step 2.2 to continue timing detection until the level changes, and then goes to step 2.4 to further determine the actual change of the level.

[0046] Step 2.4. If the level state before and after the zero-crossing stage is converted from a low level to a high level state, it is determined that the low-voltage square wave level signal is in the rising edge zero-crossing stage.

[0047] The rising edge zero-crossing point is recorded by a high-speed counter in the FPGA, and a preliminary zero-crossing point set is generated.

[0048] Step 2.5. Assume that the initial zero-crossing point set in each power frequency cycle is ,in, ={ },in, Indicates the time when all zero crossings occur during each rising edge zero crossing stage.

[0049] The zero-crossing point set As the initial input of the gray wolf population, the gray wolf population is initialized in the FPGA kernel and the zero-crossing point set Input the optimization module of the gray wolf algorithm, iterate the calculation, and obtain the optimal center zero-crossing point, that is, the gray wolf zero-crossing point.

[0050] Specifically, the processing flow of the gray wolf algorithm is as follows:

[0051] Step I. Initialize the number of iterations, the number of wolves in the pack, and the position of each individual gray wolf in the pack.

[0052] Step II. Calculate the fitness values ​​of the gray wolf individuals, and take the top three gray wolf individuals as , and There are three alpha wolves, and the position of the gray wolf with the best fitness value is taken as the optimal solution. The fitness function is:

[0053] ;

[0054] in, represents the fitness function, x is the estimated central zero point; x i is the i-th zero-crossing point in the preliminary zero-crossing point set; m is the number of zero-crossing points in the preliminary zero-crossing point set.

[0055] Step III. Calculate the distance between the gray wolf and the three alpha wolves, and update the positions of the three alpha wolves. The formula is:

[0056] (1)

[0057] (2)

[0058] (3)

[0059] Formula (1) represents , and The distance between the individual and other gray wolves; in formula (2), , and Representing three wolf leaders , and Current location; , , is a random vector, is the current position of the Gray Wolf; , , The direction of the individual gray wolves in the wolf pack is defined respectively , and the length and direction of progress; Defines the final position of the Gray Wolf.

[0060] and The calculation formula is as follows:

[0061] =2 (4)

[0062] (5)

[0063] in, is the convergence factor, which decreases linearly from 2 to 0 as the number of iterations decreases. and Get a random number between [0,1] modulo .

[0064] Convergence Factor By formula Dynamic adjustment.

[0065] in, Indicates the current iteration number, Indicates the maximum number of iterations.

[0066] Step IV. After reaching the maximum number of iterations, output The position of the wolf is taken as the value at the moment when the gray wolf's zero crossing occurs.

[0067] Step 3. Preset the number of calibration samples and calibration interval cycles.

[0068] Continuously detect and record the gray wolf zero-crossing point occurrence time of a preset calibration number of samples and calculate the average, and use the average as the initial timing cycle; from the next rising edge zero-crossing stage to the end of the timing cycle is the estimated and calibrated zero-crossing point.

[0069] At the same time, after the calibration interval period has passed since the next rising edge zero crossing stage, the gray wolf zero crossing occurrence time of the latest preset calibration sample number detected continuously is used to recalculate the average value and dynamically update the above timing cycle.

[0070] Repeat the above process, continue to estimate and calibrate the new zero-crossing point, until there is no more zero-crossing point to calibrate, then end.

[0071] Since the power frequency signal will fluctuate, the present invention adopts an appropriate calibration interval cycle number, dynamically updates the mean value of the timing time, estimates and calibrates the zero crossing point, so as to eliminate the influence of the fluctuation. The specific step 3 is:

[0072] Step 3.1. Set the number of calibration samples And the calibration interval cycle number In the actual zero-crossing calibration process, the number of calibration samples should be reasonably selected. and calibration interval cycles The value of is crucial.

[0073] The number of calibration samples determines the error size of a single zero-crossing calibration. The more calibration samples there are, the closer the estimated zero-crossing point is to the actual zero-crossing point. The fewer calibration samples there are, the more the estimated zero-crossing point is deviated from the actual zero-crossing point.

[0074] Too few calibration intervals will lead to frequent zero-crossing calibration, which will increase the system burden and be detrimental to signal processing; while too many calibration intervals will increase the cumulative phase error during system operation and affect the signal processing accuracy.

[0075] Therefore, in specific application scenarios, it is necessary to comprehensively consider factors such as the real-time performance of the system, the signal processing accuracy requirements, and the signal characteristics before determining the number of calibration samples and the number of calibration interval cycles.

[0076] Generally speaking, the number of calibration samples The value should be no less than 15, the calibration interval cycle number The value of is not less than 1.

[0077] Step 3.2. Wait for the first rising edge to cross zero, and continuously detect and record The gray wolf zero-crossing point occurs at the zero-crossing stage of the rising edge of the power frequency cycle, and is recorded as Take the mean of the occurrence times of several gray wolf zero-crossing points as the estimated zero-crossing point occurrence time, and list the following equation (6): Order Matrix .

[0078] (6)

[0079] Among them, the matrix For The time when the gray wolf zero-crossing point of the power frequency cycle occurs is 1- Different bases are averaged.

[0080] definition For the matrix No. Line The elements of the column represent each adjacent The first The absolute value of the mean of the zero-crossing times of the gray wolves is calculated using formula (7).

[0081] (7)

[0082] Step 3.3. The first continuous recording The moment when the gray wolf zero-crossing point occurs in the power frequency cycle (that is, the matrix The first row of elements in , and the mean As the initial timing period for estimating the zero crossing point .

[0083] Step 3.4. Define loop variable and the maximum number of iterations , let the loop variable The initial value of is 1.

[0084] From The timing starts from the beginning of the zero-crossing phase of the rising edge of the power frequency cycle , wait until the timing cycle The time when the timing ends is the time when The estimated The moment a zero crossing occurs.

[0085] Step 3.5. Continue to test and record The subsequent The starting and ending zero crossing points of the rising edge of the power frequency cycle are used to calculate the time when the gray wolf zero crossing occurs. .

[0086] Using the continuous forward movement from the zero crossing point at the end of the rising edge The moment when the gray wolf zero-crossing point of the power frequency cycle occurs, recalculate the continuous The average value of the gray wolf zero-crossing point occurrence time of the power frequency cycle is used to update the timing cycle .

[0087] Let loop variable Add 1, that is .

[0088] Step 3.6. Repeat steps 3.4 and 3.5 until Reached the maximum number of iterations , the zero point is no longer calibrated.

[0089] In this embodiment, the number of calibration samples is and calibration interval cycles The settings are as follows:

[0090] like , it means that the two adjacent zero-crossing calibration samples overlap; if , it means that the two adjacent zero-crossing calibration samples are unrelated; The minimum value of is 1. It means that real-time calibration of the zero point is performed in each power frequency cycle.

[0091] In specific example 1, the number of calibration samples is set , calibration interval cycle number , continuously detect and record the gray wolf zero-crossing point occurrence time of the rising edge zero-crossing point stage of 64 power frequency cycles, and record it as , and list the matrix :

[0092] .

[0093] The mean of the gray wolf zero-crossing time of 64 power frequency cycles is calculated as The timing starts at the beginning of the zero-crossing phase of the rising edge of the 65th power frequency cycle. The moment when the timing ends is the first estimated zero-crossing moment.

[0094] Continue to detect and record the gray wolf zero-crossing point occurrence time of the rising edge zero-crossing stage of the subsequent 16 power frequency cycles, and record them in turn as , calculate and update the zero-crossing mean time of the next 64 durations .

[0095] The timing starts at the beginning of the zero-crossing phase of the rising edge of the 81st power frequency cycle. The moment when the timing ends is the second estimated zero-crossing moment. According to this method, repeatedly detect and record the duration of the zero-crossing phase of the rising edge of the subsequent 16 power frequency cycles, and calculate and update the zero-crossing mean time of the next 64 durations. , start timing at the beginning of the zero-crossing phase of the rising edge of the next power frequency cycle , the time when the timing ends is the estimated zero-crossing time.

[0096] Start timing from the moment when the rising edge crosses zero ,Pass After a certain time, calibration is performed. The calibration time is the estimated zero crossing point. The subsequent calibration intervals are updated in , updated After that, continue to use the above method to recalibrate the zero point, which can prevent fluctuations caused by signal changes. By adding new calibration samples, the , adapting to signal fluctuations. The method of the invention effectively reduces the zero-crossing calibration error caused by signal interference or noise, and improves the real-time performance and accuracy of the calibration.

[0097] The comparison between the zero-crossing calibration result and the square wave signal in this embodiment is as follows: Figure 5 and Figure 3 As shown, there are fluctuations in the level before and after the zero crossing point. According to the above steps, the zero crossing point of the power frequency signal on the rising edge is successfully calibrated. The number of samples of each zero crossing calibration signal is 64. The interval between two consecutive zero crossing calibration signals is 16 power frequency cycles. The estimated zero crossing point is close to the actual zero crossing point.

[0098] In specific example 2, the number of calibration samples is set , calibration interval cycle number , the other steps are the same as in Example 1. The zero-crossing calibration result in Example 2 is as follows Figure 7 As shown in the figure, the zero crossing point of the power frequency signal on the rising edge is successfully calibrated according to the above steps. The number of samples of each zero crossing calibration signal is 64, and the interval between two consecutive zero crossing calibration signals is 64 power frequency cycles. Figure 3 It is not difficult to see from the comparison of square wave signals that in specific example 2, the estimated zero-crossing point is close to the actual zero-crossing point.

[0099] The above two specific examples fully demonstrate the effectiveness of the method of the present invention.

[0100] The method for real-time calibration of power frequency zero crossing based on the grey wolf algorithm and the dynamic mean proposed in the present invention has small amount of calculation, can accurately calibrate the power frequency zero crossing, has high real-time performance, and provides a more accurate reference basis for signal analysis and processing in related fields.

[0101] Example 2

[0102] This embodiment 2 describes a computer device. The computer device includes a memory and one or more processors. An executable code is stored in the memory. When the processor executes the executable code, the steps of the power frequency zero-crossing real-time calibration method in the above embodiment 1 are implemented.

[0103] In this embodiment, the computer device is any device or apparatus with data processing capability, which will not be described in detail here.

[0104] Example 3

[0105] This embodiment 3 describes a computer-readable storage medium on which a program is stored. When the program is executed by a processor, it is used to implement the steps of the real-time calibration method for the power frequency zero-crossing point in the above-mentioned embodiment 1.

[0106] The computer-readable storage medium may be an internal storage unit of any device or apparatus with data processing capabilities, such as a hard disk or memory, or an external storage device of any device with data processing capabilities, such as a plug-in hard disk, a smart media card (SMC), an SD card, a flash card, etc., equipped on the device.

[0107] Of course, the above description is only a preferred embodiment of the present invention, and the present invention is not limited to the above embodiments. It should be noted that all equivalent substitutions and obvious deformation forms made by any technician familiar with the field under the guidance of this specification fall within the essential scope of this specification and should be protected by the present invention.

Claims

1. A method for real-time calibration of power frequency zero crossing, characterized in that: The steps include: Step 1. First, the measured power frequency signal is reduced in voltage and compared with zero crossing, converted into a low-voltage square wave level signal, and then the transition point of the square wave signal is monitored; wherein, the low-voltage square wave level signal will fluctuate at the transition edge; Step 2. Identify the rising edge zero-crossing stage of the low-voltage square wave level signal through a preset time threshold, detect and record all zero-crossing points in the rising edge stage in real time, and generate a preliminary zero-crossing point set for each power frequency cycle; The gray wolf algorithm is used to identify the central zero-crossing point in each preliminary zero-crossing point set, which is recorded as the gray wolf zero-crossing point; Assume that the initial zero-crossing point set in each power frequency cycle is ; The initial zero-crossing point of each power frequency cycle is set As the initial input of the gray wolf population, the gray wolf population is initialized and the initial zero-crossing point set Use the Gray Wolf Algorithm to optimize and iterate to obtain the optimal center zero-crossing point, namely the Gray Wolf zero-crossing point; Step 3. Preset the number of calibration samples and the number of calibration interval cycles; Continuously detect and record the occurrence time of the gray wolf zero-crossing point of the preset calibration sample number and calculate the average value, and use the average value as the initial timing cycle; from the next rising edge zero-crossing stage to the end of the timing cycle is the estimated and calibrated zero-crossing point; At the same time, after the calibration interval period has passed since the next rising edge zero crossing stage, the gray wolf zero crossing occurrence time of the latest preset calibration sample number detected continuously is used to recalculate the average value, and the above timing period is dynamically updated; Repeat step 3 above to continue estimating and calibrating new zero-crossing points until no more zero-crossing points are calibrated. The step 3 is specifically as follows: Step 3.

1. Set the number of calibration samples n And the number of calibration interval cycles l ; Step 3.

2. Wait for the first rising edge to cross zero, and continuously detect and record n The gray wolf zero-crossing point occurs at the zero-crossing stage of the rising edge of the power frequency cycle, and is recorded as x 1, x 2,…, x n ; Step 3.

3. The first continuous recording n Take the average of the zero-crossing time of the gray wolf in the power frequency cycle T , and the mean T As the initial timing period for estimating the zero crossing point T ; Step 3.

4. Define loop variable s And the maximum number of iterations S , let the loop variable s The initial value of is 1; From n +1+( s- 1) l The timing starts from the beginning of the zero-crossing phase of the rising edge of the power frequency cycle T , when the timing ends, it is n +1+( s- 1) l The estimated s The moment when the zero crossing occurs; Step 3.

5. Continue to test and record n +1+( s- 1) l The subsequent l The rising edge of the power frequency cycle starts and ends the zero crossing point, and the subsequent l The moment when the gray wolf zero-crossing occurs in a power frequency cycle is recorded as: x n+1+(s-1)l , x n+2+(s-1)l , …, x n+sl ; Using the continuous forward movement from the zero crossing point at the end of the rising edge n The moment when the gray wolf zero-crossing point of the power frequency cycle occurs, recalculate the continuous n The average value of the gray wolf zero-crossing point occurrence time of the power frequency cycle is used to update the timing cycle T ; Let loop variable s Add 1, that is s=s +1; Step 3.

6. Repeat steps 3.4 and 3.5 until s Reached the maximum number of iterations S , the zero point is no longer calibrated.

2. The method for real-time calibration of power frequency zero crossing according to claim 1, characterized in that: The step 1 is specifically as follows: Step 1.

1. Obtain the required power frequency signal from the mains socket; Step 1.

2. First, the power frequency signal is stepped down by a transformer to obtain a low-voltage sinusoidal AC signal, and then a DC component is superimposed to transform it into a sinusoidal DC signal; finally, it is converted into a low-voltage square wave level signal output by a comparison circuit; Since the power frequency signal contains interference, the low-voltage square wave level signal will have multiple zero crossing points on both the rising and falling edges; Step 1.

3. Input the low-voltage square wave level signal into the FPGA and monitor the transition point of the low-voltage square wave level signal.

3. The method for real-time calibration of power frequency zero crossing according to claim 2, characterized in that: The industrial frequency signal is a 220V AC signal, and the low-voltage sinusoidal AC signal is 1.2V-3.3V.

4. The method for real-time calibration of power frequency zero crossing point according to claim 1, characterized in that: The step 2 is specifically as follows: Step 2.

1. Preset a time threshold to detect whether it is in the zero-crossing stage; Step 2.

2. When the level of the low voltage square wave level signal changes, start timing from zero; Step 2.

3. If the level changes again before the timing time starting from zero reaches the time threshold, then the low-voltage square wave level signal is at the zero-crossing stage, and then go to step 2.4 to further determine the actual change of the level; If the level does not change when the timing time from zero reaches the time threshold, it is a stable level, and the process returns to step 2.2 to continue timing detection until the level changes, and then goes to step 2.4; Step 2.

4. If the level state before and after the zero-crossing stage is converted from a low level to a high level state, then it is determined that the low-voltage square wave level signal is in the rising edge zero-crossing stage, and the rising edge zero-crossing point is recorded to generate a preliminary zero-crossing point set; Step 2.

5. Assume that the initial zero-crossing point set in each power frequency cycle is ; The initial zero-crossing point of each power frequency cycle is set As the initial input of the gray wolf population, the gray wolf population is initialized and the initial zero-crossing point set The Gray Wolf Algorithm is used for optimization and iterative calculation to obtain the optimal center zero-crossing point, namely the Gray Wolf Zero-crossing Point.

5. The method for real-time calibration of power frequency zero crossing point according to claim 4, characterized in that: In step 2.1, the preset time threshold is greater than the duration of a single zero-crossing stage and less than half of the power frequency cycle, so as to ensure that only a single zero-crossing stage can be covered within each power frequency cycle threshold range.

6. The method for real-time calibration of power frequency zero crossing point according to claim 4, characterized in that: The step 2.5 is specifically as follows: Step I. Initialize the number of iterations, the number of wolves in the pack, and the position of each individual gray wolf in the pack; Step II. Calculate the fitness values ​​of the gray wolf individuals, and take the top three gray wolf individuals as α , β and γ There are three alpha wolves, and the position of the gray wolf with the best fitness value is taken as the optimal solution. The fitness function is: ; in, Fitness ( x ) represents the fitness function, x is the estimated central zero crossing point; x i is the first i zero crossing; m is the number of zero-crossing points in the preliminary zero-crossing point set; Step III. Calculate the distance between the gray wolf and the three alpha wolves, and update the positions of the three alpha wolves; Step IV. After reaching the maximum number of iterations, output α The position of the wolf is taken as the value at the moment when the gray wolf's zero crossing occurs.

7. The method for real-time calibration of power frequency zero crossing point according to claim 1, characterized in that: In step 3.1, the number of calibration samples n and calibration interval cycles l The settings are as follows: like l < n , it means that the two adjacent zero-crossing calibration samples overlap; if l ≥ n , it means that the two adjacent zero-crossing calibration samples are unrelated; l The minimum value of is 1. l =1 means that real-time calibration of the zero point is performed in each power frequency cycle.

8. A computer device comprising a memory and one or more processors; an executable code is stored in the memory; characterized in that: When the processor executes the executable code, it is used to implement the steps of the power frequency zero-crossing real-time calibration method described in any one of claims 1 to 7.

9. A computer-readable storage medium having a program stored thereon; characterized in that: When the program is executed by a processor, it is used to implement the steps of the power frequency zero-crossing real-time calibration method described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Totem-pole rectifier control method based on zero-crossing point current distortion online compensation

    CN112117888A

  • Method for adjusting the frequency of an oscillator for a receiver circuit

    US6044118A