A method and system for automatically detecting the zero-crossing point of fundamental voltage

Through microcontroller sampling and periodic function feature analysis, it is possible to accurately detect the zero-crossing point of the AC grid voltage in the grid voltage notch and harmonic interference environment, solving the problems of false detection and hardware complexity in the existing technology, and improving the detection accuracy. and rapidity.

CN114509598BActive Publication Date: 2024-09-13ZHEJIANG NANDE ELECTRIC MFG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210133858.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-11-19
Publication Date
2024-09-13
Estimated Expiration
2039-11-19

AI Technical Summary

Technical Problem

The existing AC grid voltage zero-crossing detection circuit has poor anti-interference ability and serious false detection when faced with grid voltage notch and harmonic interference. The hardware is complex and costly, and it is unable to accurately obtain the zero-crossing point. It is especially unsuitable for single-phase Grid voltage detection.

Method used

The automatic detection method of fundamental wave voltage zero-crossing point based on microcontroller is used to determine the periodic function characteristics of the sampling waveform, sample the AC voltage signal, calibrate the power supply reference value, determine the zero-crossing point and eliminate interference, and use slope calculation and period estimation to achieve high-precision detection. Reduce hardware costs.

Benefits of technology

It achieves accurate determination of the fundamental voltage zero-crossing point in notch and harmonic interference environments, improves detection accuracy and speed, reduces hardware costs, and is suitable for single-phase power grid voltage detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114509598B
    Figure CN114509598B
Patent Text Reader

Abstract

A method, system and sampling device for automatically detecting the zero-crossing point of fundamental voltage, including sampling an AC signal through a single-chip microcomputer; sampling at least two cycles to obtain a number of sampling points, marking each sampling point and the plane coordinates of the sampling point; comparing two adjacent sampling points with a reference value to determine whether the sampling point is a zero-crossing point, and then determining whether it is a positive zero-crossing or a reverse zero-crossing to obtain a zero-crossing point array Zn; using this zero-crossing point array Zn to represent the plane graphic meaning of the zero-crossing point. The zero-crossing point array is judged based on the periodic function characteristics of the sampled waveform to exclude interference with the zero-crossing point array; by finding the zero-crossing point array of the fundamental voltage sine wave or the zero-crossing point array of the fundamental voltage sine wave or the zero-crossing point array of the harmonic wave within at least two sampling cycles, the zero-crossing point array of the next cycle is calculated. The present invention proposes a method for sampling and detecting zero-crossing points using a single-chip microcomputer with an ADC function, which has strong anti-interference and high precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of AC power grid voltage zero-crossing detection, and in particular to a power grid voltage zero-crossing point automatic detection method and system. Background Art

[0002] AC grid voltage zero-crossing detection refers to the detection of the zero-crossing moment by the electronic circuit when the voltage waveform switches from the positive half cycle to the negative half cycle or from the negative half cycle to the positive half cycle in a sinusoidal AC system. The existing commonly used detection circuit uses the optocoupler's photoelectric isolation and zero-crossing forward conduction characteristics to realize the detection of zero-crossing signals.

[0003] In practical applications, due to background noise factors such as grid voltage notch and harmonic interference, the input signal usually experiences jitter, notch, and severe waveform distortion near the zero crossing point or even at non-zero crossing points, resulting in multiple zero crossings in the detection circuit and a large error between the actual fundamental zero point and the extracted zero point, which may lead to false detection in severe cases.

[0004] Common zero-crossing detection circuits and their defects are as follows:

[0005] (1) The software phase-locked loop based on synchronous rotating coordinate transformation and its improved technology have strong real-time performance and do not require zero-crossing comparison. It can accurately obtain the frequency, amplitude and phase information of the fundamental positive sequence component of the input voltage. However, this phase-locked technology requires complex coordinate transformation and a large number of mathematical operations. When the grid voltage is distorted or unbalanced, its rapidity and accuracy will be affected. In particular, this method is not suitable for phase-locking single-phase grid voltage. This method has a relatively complex hardware circuit, a large amount of software calculation, and high requirements on the computing power and speed of the microprocessor. The hardware cost and software development cost are high.

[0006] (2) Using the photoelectric conversion characteristics, the microprocessor detects the corresponding time of the leading and trailing edges of the shaped trapezoidal wave signal and calculates the zero-crossing time. This method performs sinusoidal wave shaping near the zero-crossing point, which is prone to malfunction. This brings large errors to the signal processing of the single-chip microcomputer. In addition, the single-chip microcomputer must detect the falling edge of the trapezoidal wave to obtain the zero-crossing time. At this time, the zero-crossing time is already in the past, which cannot meet the requirements of accurate zero-crossing triggering of some circuits.

[0007] (3) Use a transformer or voltage transformer or resistor divider to convert the AC power into a low-voltage signal of the same frequency and phase, and use an optocoupler to generate a pulse when the AC voltage is close to the zero point. The time when the microprocessor external interrupt is generated is used as the zero point. The time when the external interrupt is generated in this circuit is not strictly zero, and the error is large. In addition, the optocoupler conduction time is long, that is, the gradual change process from zero to conduction current of the optocoupler current is long, resulting in obvious differences in the edge time of the optocoupler characteristics. The experimental test measured that the maximum time difference between the conduction performance of the two optocouplers reached 50μs, which caused great trouble for the use of this circuit for synchronization signal creation for equipment with higher requirements. The circuit contains a transformer or voltage transformer, which increases the size and mass of the equipment. Summary of the invention

[0008] Aiming at the defects of poor anti-interference and complex circuit in the existing zero-crossing detection circuit, the present invention proposes a high-precision AC voltage zero-crossing detection method and detection system with strong anti-interference performance based on the existing voltage detection circuit and applied in a single-chip microcomputer with ADC function.

[0009] A method for automatically detecting a fundamental voltage zero-crossing point, the steps are as follows:

[0010] Step 1, determining the periodic function characteristics of the sampling waveform;

[0011] Step 2, sampling the AC voltage signal through the single chip microcomputer;

[0012] Step 3, calibrating the single chip microcomputer power supply reference value to eliminate the reference deviation;

[0013] Step 4, sampling at least two cycles, obtaining a number of sampling points, marking each sampling point and the plane coordinates of the sampling point;

[0014] Step 5, comparing the plane Y coordinates of two adjacent sampling points with the single-chip power supply reference value to determine whether the sampling point is a zero-crossing point, and then performing a slope calculation on the plane XY coordinates of the adjacent sampling points to determine whether it is a positive zero-crossing or a reverse zero-crossing, and obtaining a zero-crossing point array Zn using the plane X coordinates of the zero-crossing point and the slope K; the zero-crossing point array Zn represents the plane graphic meaning of the zero-crossing point;

[0015] Step 6, judging the positive and negative voltage zero-crossing point arrays according to the periodic function characteristics of the sampling waveform, and eliminating the interference voltage zero-crossing point arrays;

[0016] Step 7, respectively find out the fundamental voltage zero-crossing array or the notch zero-crossing array at the fundamental voltage zero-crossing point or the harmonic zero-crossing array at the fundamental voltage zero-crossing point in the order of the sampling period, take the first fundamental voltage zero-crossing array or the notch zero-crossing array at the fundamental voltage zero-crossing point or the harmonic zero-crossing array at the fundamental voltage zero-crossing point as the calculation starting point, calculate the period value between the fundamental voltage zero-crossing array or the notch zero-crossing array at the fundamental voltage zero-crossing point or the harmonic zero-crossing array at the fundamental voltage zero-crossing point, and deduce the fundamental voltage zero-crossing array or the notch zero-crossing array at the fundamental voltage zero-crossing point or the harmonic zero-crossing array at the fundamental voltage zero-crossing point of the next period;

[0017] When the sampling starting point is sampled from the negative half cycle to the positive half cycle, if there are more than or equal to 2 continuous voltage zero-crossing point arrays within x sampling points after the Zn voltage zero-crossing point array, and the K values ​​in the two continuous voltage zero-crossing point arrays are opposite, then Zn is the notch voltage zero-crossing point array at the zero-crossing point of the positive half cycle of the fundamental voltage sine wave; if there is no voltage zero-crossing point array within x sampling points after the Zn voltage zero-crossing point array, then Zn is the zero-crossing point array of the positive half cycle of the fundamental voltage sine wave; if there is a positive voltage zero-crossing point array among all the voltage zero-crossing point arrays, at least j preceding sampling values ​​of this voltage zero-crossing point array are less than the voltage reference reference value, and at least j succeeding sampling values ​​are greater than the voltage reference reference value, then the positive voltage zero-crossing point array is the harmonic zero-crossing point array at the zero-crossing point of the positive half cycle of the fundamental voltage sine wave.

[0018] Optionally, step 7.1: taking the first same-direction fundamental voltage zero-crossing point array or the same-direction fundamental voltage zero-crossing point notch zero-crossing point array or the same-direction fundamental voltage zero-crossing point harmonic zero-crossing point array as the calculation starting point, calculate the period value between the same-direction zero-crossing point arrays between each two in the first and second sampling periods;

[0019] Step 7.2: Set the allowable error and compare the two calculated same-direction period values;

[0020] Step 7.3: If the two period values ​​are the same within the error range, go to step 7.4; if the two period values ​​are different, go to step 7.5;

[0021] Step 7.4: Calculate the zero-crossing point array of the same-direction fundamental voltage or the zero-crossing point array of the same-direction fundamental voltage or the zero-crossing point array of the harmonics at the zero-crossing point of the same-direction fundamental voltage in the next cycle based on this cycle;

[0022] Step 7.5: Using the slip method, continue one sampling cycle, compare the period values ​​between the zero-crossing point arrays in the same direction between the second and third sampling cycles, and proceed to step 7.3 for judgment.

[0023] Optionally, the method for calculating the positive zero-crossing point array and the reverse zero-crossing point array is as follows:

[0024] When the preceding sampling value Yn is less than the reference value and the succeeding sampling value Yn+1 is greater than or equal to the reference value, it is a positive zero crossing;

[0025] The preceding sampling value Yn is greater than the reference value, and the succeeding sampling value Yn+1 is less than or equal to the reference value, which is a reverse zero crossing;

[0026] The positive and negative zero-crossing point array Zn includes the preceding sampling value sequence number Xn and the corresponding zero-crossing slope value Kn, forming an array Zn{Xn, Kn}, Kn={(Yn+1)-Yn} / {(Xn+1)-Xn}, Kn is greater than zero for positive zero crossing, and Kn is less than zero for negative zero crossing.

[0027] Optionally, if the sampling starting point starts from the negative half cycle of the fundamental voltage sine wave, Zn is the voltage zero-crossing point array, and the sampling period includes n voltage reverse zero-crossing point arrays and n+1 voltage positive zero-crossing point arrays, then the fundamental voltage positive zero-crossing point array plus tn is equal to the next fundamental voltage positive zero-crossing point array, and the fundamental voltage reverse zero-crossing point array plus fn is equal to the next fundamental voltage positive zero-crossing point array;

[0028] Among them, tn is the time period from the previous fundamental wave positive zero-crossing point array to the next fundamental wave positive zero-crossing point array; fn is the time period from the previous fundamental wave negative zero-crossing point array to the next fundamental wave negative zero-crossing point array.

[0029] Optionally, when the sampling starting point is sampled from the positive half cycle to the negative half cycle, if there are more than or equal to 2 continuous voltage zero-crossing point arrays within x sampling points after the Zn voltage zero-crossing point array, and the K value is opposite, then it is judged that Zn is the notch voltage zero-crossing point array at the zero-crossing point of the negative half cycle of the fundamental voltage;

[0030] If there are no two consecutive voltage zero-crossing point arrays within x sampling points after the Zn voltage zero-crossing point array, Zn is judged to be the fundamental voltage negative half-cycle zero-crossing point array.

[0031] Optionally, when the sampling start point is sampled from the negative half cycle to the positive half cycle:

[0032] If there are more than or equal to 2 continuous voltage zero-crossing point arrays outside of x sampling points after the Zn voltage zero-crossing point array, the K values ​​of the two continuous voltage zero-crossing point arrays are opposite, and the x sampling point values ​​before and after the two continuous voltage zero-crossing point arrays are all positive values, then Zn is a notch zero-crossing point array at the zero-crossing point of the positive half-cycle of the non-fundamental voltage sine wave.

[0033] Optionally, when the sampling start point is sampled from the positive half cycle to the negative half cycle:

[0034] If there are more than or equal to 2 continuous voltage zero-crossing point arrays outside of x sampling points after the Zn voltage zero-crossing point array, the K values ​​of the two continuous voltage zero-crossing point arrays are opposite, and the x sampling points Yn before and after the two continuous voltage zero-crossing point arrays are all negative values, then Zn is a notch zero-crossing point array at the zero point of the negative half-cycle of the non-fundamental voltage sine wave.

[0035] Optionally, the value of j is greater than: a value obtained by dividing a cycle time by the maximum number of superimposed harmonics by a sampling period and then dividing the calculated value by 2.

[0036] Optionally, the value of x is greater than: a value calculated by dividing the period of the oscillation waveform generated by the zero-crossing notch by the sampling period.

[0037] Based on the above method, the present invention also provides a fundamental voltage zero-crossing point automatic detection system, which is used to implement the above fundamental voltage zero-crossing point automatic detection method;

[0038] It includes a sampling unit, which performs voltage sampling according to a sampling frequency and determines a sampling point;

[0039] The judgment unit judges the sampling point to determine the zero-crossing point array; judges the zero-crossing point array to determine the positive and negative zero-crossing point array; judges the zero-crossing point array to determine the fundamental voltage zero-crossing point array or the notch zero-crossing point array at the fundamental voltage zero-crossing point or the harmonic zero-crossing point array at the fundamental voltage zero-crossing point;

[0040] A zero-crossing array storage unit is used to store sampling point data, zero-crossing array data, forward and reverse zero-crossing data, and a fundamental voltage zero-crossing array or a notch zero-crossing array at the fundamental voltage zero-crossing point or a harmonic zero-crossing array at the fundamental voltage zero-crossing point;

[0041] The main control unit controls the operation of the sampling unit, the zero-crossing point array storage unit and the judgment unit.

[0042] Beneficial effects of the present invention:

[0043] 1. Through single-chip microcomputer sampling, the voltage fundamental wave zero-crossing point can be judged. The sampling circuit is a commonly used circuit, which is simple and reliable, and has low hardware cost.

[0044] 2. The present invention uses the fundamental voltage zero-crossing point array Zn to represent the plane graphic meaning of the zero-crossing point, and analyzes the periodic function characteristics of the sine wave to realize a method that can automatically determine the fundamental zero-crossing point, and the fundamental voltage zero-crossing point can still be accurately found in the environment of notch and harmonic interference.

[0045] 3. The present invention adopts single chip microcomputer sampling, and the sampling interval is less than or equal to 20us, so the calculated zero time has high accuracy, which is less than or equal to ±20us.

[0046] 4. The sampling period of the present invention can be adjusted according to demand. In order to improve the accuracy of zero point judgment, the judgment period is at least 2 cycles of 40ms, and the fastest action period is the 3rd cycle of 60ms. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0048] Figure 1 This is a 50Hz voltage sampling waveform;

[0049] Figure 2 This is a partial enlarged view of the 50Hz voltage sampling waveform;

[0050] Figure 3 This is the waveform diagram of 50Hz voltage superimposed notch sampling;

[0051] Figure 4 This is the waveform of the positive half cycle of the 50Hz voltage superimposed notch;

[0052] Figure 5 yes Figure 4 A magnified view of the sampling starting point from the negative half cycle to the positive half cycle;

[0053] Figure 6 yes Figure 4 A magnified view of the sampling starting point from the positive half cycle to the negative half cycle;

[0054] Figure 7 This is the 50Hz superimposed harmonic voltage sampling waveform;

[0055] Figure 8 This is the waveform of the positive half cycle of the 50Hz superimposed harmonic voltage;

[0056] Fig. 9 It is the circuit schematic diagram of the sampling device. DETAILED DESCRIPTION

[0057] The present invention is further described in detail below in conjunction with embodiments. The following embodiments are for explanation of the present invention but the present invention is not limited to the following embodiments.

[0058] A method for automatically detecting a voltage zero-crossing point, wherein the detected voltage is a fundamental sine wave, and the fundamental frequency is a fundamental sine wave of 50 Hz or 60 Hz or other frequencies.

[0059] Here are the steps:

[0060] Step 1, determining the periodic function characteristics of the sampling waveform;

[0061] Step 2, sampling the AC voltage signal through the single chip microcomputer;

[0062] Step 3, calibrating the single chip microcomputer power supply reference value to eliminate the reference deviation;

[0063] Step 4, sampling at least two cycles, obtaining a number of sampling points, marking each sampling point and the plane coordinates of the sampling point;

[0064] Step 5, comparing the plane Y coordinates of two adjacent sampling points with the single-chip computer power supply reference value to determine whether the sampling point is a zero-crossing point, and then performing a slope calculation on the plane XY coordinates of the adjacent sampling points to determine whether it is a positive zero-crossing or a reverse zero-crossing, and obtaining a zero-crossing point array Zn with the zero-crossing point plane X coordinates and the slope; the zero-crossing point array Zn represents the plane graphic meaning of the zero-crossing point;

[0065] Step 6, judging the forward and reverse voltage zero-crossing point arrays according to the periodic function characteristics of the sampling waveform, excluding the interference voltage zero-crossing point array, and obtaining the fundamental voltage sine wave zero-crossing point array; the interference voltage zero-crossing point array includes the interference voltage zero-crossing point array after the fundamental voltage sine wave is superimposed with a notch wave and the interference voltage zero-crossing point array after the fundamental voltage sine wave is superimposed with harmonics;

[0066] Step 7, find out all zero-crossing point arrays or notch zero-crossing point arrays at the zero-crossing point of the fundamental voltage or harmonic zero-crossing point arrays at the zero-crossing point of the fundamental voltage in sequence for at least two fundamental voltage sine wave cycles, take the first fundamental voltage zero-crossing point array or notch zero-crossing point array at the zero-crossing point of the fundamental voltage or harmonic zero-crossing point array at the zero-crossing point of the fundamental voltage as the calculation starting point, calculate the period value between the fundamental voltage zero-crossing point array or notch zero-crossing point array at the zero-crossing point of the fundamental voltage or harmonic zero-crossing point array at the zero-crossing point of the fundamental voltage, and deduce the fundamental voltage zero-crossing point array or notch zero-crossing point array at the zero-crossing point of the next cycle or harmonic zero-crossing point array at the zero-crossing point of the fundamental voltage.

[0067] Step 7.1: Taking the first zero-crossing point array of the same-direction fundamental voltage or the zero-crossing point array of the notch wave at the zero-crossing point of the same-direction fundamental voltage or the zero-crossing point array of the harmonic wave at the zero-crossing point of the same-direction fundamental voltage as the calculation starting point, calculate the period value between the zero-crossing point arrays of the same direction between each other in the first and second sampling periods;

[0068] Step 7.2: Set the allowable error and compare the two calculated same-direction period values;

[0069] Step 7.3: If the two period values ​​are the same within the error range, go to step 7.4; if the two period values ​​are different, go to step 7.5;

[0070] Step 7.4: Calculate the zero-crossing point array of the same-direction fundamental voltage or the zero-crossing point array of the same-direction fundamental voltage or the zero-crossing point array of the harmonics at the zero-crossing point of the same-direction fundamental voltage in the next cycle based on this cycle;

[0071] Step 7.5: Using the slip method, continue one sampling cycle, compare the period values ​​between the zero-crossing point arrays in the same direction between the second and third sampling cycles, and proceed to step 7.3 for judgment.

[0072] The slip comparison is performed for up to 10 sampling cycles to find two identical zero-crossing point array cycles of the fundamental voltage in the same direction. Otherwise, it is considered that the grid waveform cannot be determined.

[0073] It should be noted that: the fundamental sine wave and the fundamental sine wave superimposed notch can be judged by using the array of adjacent zero crossing points in the same direction and the opposite direction; when the fundamental sine wave is superimposed with harmonics, only the adjacent zero crossing points in the same direction can be used for judgment. Specific details are introduced in the embodiments.

[0074] The method for calculating the positive zero-crossing point array and the reverse zero-crossing point array is as follows:

[0075] When the preceding sampling value Yn is less than the reference value and the succeeding sampling value Yn+1 is greater than or equal to the reference value, it is a positive zero crossing;

[0076] The preceding sampling value Yn is greater than the reference value, and the succeeding sampling value Yn+1 is less than or equal to the reference value, which is a reverse zero crossing;

[0077] The positive and negative zero-crossing point array Zn includes the preceding sampling value sequence number Xn and the corresponding zero-crossing slope value Kn, forming an array Zn{Xn, Kn}, Kn={(Yn+1)-Yn} / {(Xn+1)-Xn}, Kn is greater than zero for positive zero crossing, and Kn is less than zero for negative zero crossing.

[0078] If the sampling start point starts from the negative half cycle of the fundamental voltage sine wave, Zn is the voltage zero-crossing point array, and the sampling period includes n voltage negative zero-crossing point arrays and n+1 voltage positive zero-crossing point arrays, then the fundamental voltage positive zero-crossing point array plus tn is equal to the next fundamental voltage positive zero-crossing point array, and the fundamental voltage negative zero-crossing point array plus fn is equal to the next fundamental voltage positive zero-crossing point array.

[0079] Among them, tn is the time period from the previous fundamental wave positive zero crossing point to the next fundamental wave positive zero crossing point; fn is the time period from the previous fundamental wave negative zero crossing point to the next fundamental wave negative zero crossing point.

[0080] After the fundamental voltage sine wave is superimposed with the notch, the number of its positive zero-crossing point arrays and reverse zero-crossing point arrays in the sampling period is greater than the number of the fundamental voltage positive and reverse zero-crossing point arrays. The calculation process is as follows:

[0081] a. When the sampling starting point is sampled from the negative half cycle to the positive half cycle, if there are more than or equal to 2 consecutive voltage zero-crossing point arrays within x sampling points after the Zn voltage zero-crossing point array, and the K values ​​in the two consecutive voltage zero-crossing point arrays are opposite, then Zn is the notch voltage zero-crossing point array at the zero-crossing point of the positive half cycle of the fundamental voltage sine wave;

[0082] If there is no voltage zero-crossing array within x sampling points after the Zn voltage zero-crossing array, then Zn is the zero-crossing array of the positive half cycle of the fundamental voltage sine wave;

[0083] b. When the sampling starting point is sampling from the positive half cycle to the negative half cycle, if there are more than or equal to 2 continuous voltage zero-crossing point arrays within x sampling points after the Zn voltage zero-crossing point array, and the K value is opposite, then it is judged that Zn is the notch voltage zero-crossing point array at the zero-crossing point of the negative half cycle of the fundamental voltage;

[0084] If there are no two consecutive voltage zero-crossing point arrays within x sampling points after the Zn voltage zero-crossing point array, then Zn is judged to be the fundamental voltage negative half-cycle zero-crossing point array;

[0085] c. According to steps a and b, find out all fundamental voltage zero-crossing point arrays or notch voltage zero-crossing point arrays at the fundamental voltage zero-crossing point in sequence within the sampling period, take the first fundamental voltage zero-crossing point array or notch voltage zero-crossing point array at the fundamental voltage zero-crossing point as the calculation starting point, calculate the period value between them and infer the next period fundamental voltage zero-crossing point array or notch voltage zero-crossing point array at the fundamental voltage zero-crossing point.

[0086] When the sampling starting point is sampled from the negative half cycle to the positive half cycle, if there are more than or equal to 2 continuous voltage zero-crossing point arrays outside x sampling points after the Zn voltage zero-crossing point array, the K values ​​of the two continuous voltage zero-crossing point arrays are opposite, and the x sampling point values ​​before and after the two continuous voltage zero-crossing point arrays are all positive values, then the Zn is a notch zero-crossing point array at the zero-crossing point of the positive half cycle of the non-fundamental voltage sine wave.

[0087] When the sampling starting point is sampled from the positive half cycle to the negative half cycle, if there are more than or equal to 2 continuous voltage zero-crossing point arrays outside x sampling points after the Zn voltage zero-crossing point array, the K values ​​of the two continuous voltage zero-crossing point arrays are opposite, and the x sampling points Yn before and after the two continuous voltage zero-crossing point arrays are all negative values, then the Zn is a notch zero-crossing point array at the zero point of the negative half cycle of the non-fundamental voltage sine wave.

[0088] After the fundamental voltage sine wave is superimposed with harmonics, the number of its forward voltage zero-crossing point arrays and reverse voltage zero-crossing point arrays in the sampling period is greater than the number of the forward and reverse arrays of the fundamental voltage sine wave. When the sampling starting point is sampled from the negative half cycle to the positive half cycle, if there is a forward voltage zero-crossing point array among all the voltage zero-crossing point arrays, at least j preceding sampling values ​​of this voltage zero-crossing point array are less than the voltage reference reference value, and at least j succeeding sampling values ​​are greater than the voltage reference reference value, then the forward voltage zero-crossing point array is the harmonic zero-crossing point array at the zero-crossing point of the positive half cycle of the fundamental voltage sine wave;

[0089] The harmonic zero-crossing point arrays of all the fundamental voltage sine wave zero-crossing points in the positive half-cycle are found in sequence within the sampling period, and the harmonic zero-crossing point array of the first fundamental voltage sine wave zero-crossing point is used as the calculation starting point. The period value between them is calculated to infer the harmonic zero-crossing point array of the next fundamental voltage sine wave zero-crossing point in the positive half-cycle.

[0090] Among them, the above j value is greater than: a cycle time divided by the maximum number of superimposed harmonics divided by the sampling period, the value calculated is divided by 2. The above x value is greater than: the period of the oscillation waveform generated by the zero-crossing notch divided by the sampling period. The calculation process of the values ​​of j and x will be explained in detail below.

[0091] The following implementation method is used for the detection of voltage zero crossing of the national grid standard voltage 220v / 50Hz (hereinafter referred to as standard sine wave). Similarly, the method of obtaining 60Hz voltage or other standard sine wave voltage can be used.

[0092] 1. Analysis of the periodic function interference on the power grid voltage

[0093] 1.1 Notch refers to the phenomenon that the commutation device causes a dip or notch in the voltage waveform during phase switching, which is a periodic function interference.

[0094] 1.2 Harmonics refer to waveforms produced by the distortion of current and voltage waveforms due to nonlinear load operation, and are a type of periodic function interference.

[0095] 1.3 In a sinusoidal AC system, the voltage waveform of the power grid is a periodic function. Background noise factors such as grid voltage notch or harmonic interference are generated by load operation. Therefore, during load operation, these interferences are also the superposition of one or several periodic functions. When several periodic functions are superimposed, their respective periods will not change.

[0096] 1.4 The voltage of my country's low-voltage power grid is a sine wave with a standard frequency of 50Hz and a period of 20ms. No matter what kind of periodic interference is superimposed, its period of 20ms cannot be changed. That is to say, there are always two zero-crossing points on the waveform with a time difference of 20ms, or there are always three zero-crossing points on the waveform, and the sum of the time differences between the first two and the last two zero-crossing points is 20ms.

[0097] 1.5 When the interference of a periodic function is superimposed on the standard sine wave waveform and a new zero-crossing point appears, this new zero point is also periodic.

[0098] 2. Characteristics of MCU ADC sampling IO port

[0099] 2.1 When the AC signal is sent to the ADC sampling IO port of the microcontroller, the ADC sampling frequency of the IO port determines the maximum number of sampling points in one cycle. The more sampling points there are, the more accurate the sampling zero-crossing time is.

[0100] 2.2 When the AC signal is sent to the ADC sampling IO port of the microcontroller, the number of ADC sampling bits of the IO port determines the minimum resolution of the sampled voltage amplitude, that is, the accuracy of the voltage. The higher the ADC sampling bit number, the higher the voltage accuracy.

[0101] 2.3 Taking the 8-bit single-chip microcomputer STM8S207 of STMicroelectronics as an example, there is a 10-bit continuous progressive analog-to-digital converter ADC2 inside the chip, and the conversion time is 14 clock cycles. The embodiment of the present invention adopts this single-chip microcomputer.

[0102] 3. Calculation of sampling point values

[0103] 3.1 Although the more sampling points, the more accurate the sampling zero-crossing time, but the sampling conversion value will occupy more space in the microcontroller cache, which will affect the program running time of the microcontroller, so it is necessary to calculate a reasonable number of sampling points according to the needs of the application.

[0104] 3.2 The automatic detection method for the grid voltage zero-crossing point in this application needs to determine that the sampling waveform has the characteristics of a 50Hz periodic function, so a sampling time of 40ms is required to determine the specific time when the voltage crosses zero in the next cycle.

[0105] 3.3 The maximum harmonic allowed to be superimposed in the present method for automatic detection of the zero-crossing point of the voltage of the power grid is 51 times. The superimposed frequency based on this calculation is 2550Hz, and its cycle time is 1 / 2550=392us. According to the sampling theorem, "In the process of analog / digital signal conversion, when the sampling frequency fs.max is greater than twice the highest frequency fmax in the signal (fs.max>2fmax), the digital signal after sampling completely retains the information in the original signal. Generally, in practical applications, the sampling frequency is guaranteed to be 2.56 to 4 times the highest frequency of the signal; the sampling theorem is also called the Nyquist theorem". The sampling interval can meet the requirements of 51st harmonic sampling as long as it is less than 150us. In order to take into account the sampling of the minimum pulse width of 55.6us of the notch and improve the accuracy of the voltage zero-crossing point, the sampling interval of the present invention is required to be less than or equal to 20us, so the sampling points of one cycle of the 51st harmonic are at least 20, and the total sampling points of the 50Hz cycle are at least 1020.

[0106] 3.4 The minimum width of the superimposed notch pulse allowed by this grid voltage zero-crossing automatic detection method is 55.6us. Since the notch is generated by the power electronic device during phase switching, the minimum phase switching time is generally the 1-degree conduction angle time of the power electronic device, that is, 20ms / 360=55.6us. The period of the oscillation waveform generated by the voltage zero-crossing notch is generally 5 to 6 times the conduction time, that is, 6*55.6us=333.6us, 333.6us / 20us=17 sampling points, and 20 sampling points are generally selected as the zero-crossing period for judging.

[0107] 3.5 Since the sampling interval is 20us, the voltage zero-crossing point calculation accuracy of the implementation scheme of the present invention is ±20us.

[0108] 3.6 The plane graphic meaning of the zero-crossing points is represented by the zero-crossing point array Zn.

[0109] Example 1: Figure 1 This is a standard 50Hz voltage sampling waveform, where there are sampling points before and after the zero point of the waveform. Figure 2 The figure shows an enlarged view of the sampling points before and after the zero-crossing point of the waveform, with sampling numbers Xn, Xn+1;

[0110] Embodiment 1 is used to calculate the zero crossing points in the following cases: the zero crossing point of the fundamental voltage sine wave; after the fundamental voltage sine wave is superimposed with a notch wave, the number of positive zero crossing points and reverse zero crossing points in the sampling period is the same as that of the fundamental sine wave; after the fundamental sine wave is superimposed with a harmonic, the number of positive zero crossing points and reverse zero crossing points in the sampling period is the same as that of the fundamental sine wave.

[0111] Step 1: Basis Fig. 9It can be seen from the sampling circuit that the AC voltage is processed by the AC voltage sampling circuit and then input into the single-chip microcomputer. The AC voltage sampling circuit includes an AC voltage input terminal and an ADC output terminal; the single-chip microcomputer with ADC function includes an ADC sampling IO port. The ADC output terminal is connected to the ADC sampling IO port. Since the sampling circuit has various forms and is mostly a common technology in this field, it will not be described here.

[0112] The AC signal collected by the ADC sampling channel of the single-chip microcomputer will fluctuate between 0V and +5V with +2.5V as the 0 axis. That is, +2.5V-+5V is the positive half-cycle waveform interval of the AC signal, and 0-+2.5V is the negative half-cycle waveform interval of the AC signal.

[0113] Step 2: According to the public information of STM8 microcontroller, the sampling channel IO port is a 10-bit ADC, that is, the sampling accuracy is 5V / (1024-1)=0.05V.

[0114] Step 3: For the AC waveform of the MCU ADC sampling channel, 1024 points are collected within a 20ms period through program control, that is, the sampling point time interval is 20000 / (1024-1)=19.55us, and a total of 3 cycles of 60ms are collected.

[0115] Step 4: The microcontroller calibrates the +2.5V power supply reference value to eliminate the reference deviation.

[0116] Step 5: The MCU marks the zero-crossing point sequence and classifies it according to the real-time voltage waveform sampling value:

[0117] (1) The single-chip microcomputer performs sampling for three cycles, that is, there are 1024*3=3072 sampling points. Each sampling point is labeled with a serial number and the plane coordinates Xn and Yn of the sampling point are marked.

[0118] (2) For each sampling point value, a judgment is made as to whether it is greater than, equal to, or less than +2.5V.

[0119] (3) The voltage sampling positive and negative zero crossing graph is as follows Figure 2 As shown: the preceding sampling value is recorded as Yn, the succeeding sampling value is recorded as Yn+1, and the array of positive and negative voltage zero crossing points is recorded as Zn. When a positive zero crossing occurs, that is, the preceding sampling value Yn is less than 2.5V and the succeeding sampling value Yn+1 is greater than or equal to 2.5V; or a reverse zero crossing occurs, that is, the preceding sampling value Yn is greater than 2.5V and the succeeding sampling value Yn+1 is less than or equal to 2.5V, the preceding sampling value number Xn and the corresponding zero crossing slope value Kn are recorded to form an array Zn{Xn, Kn}.

[0120] (4) Kn = (Yn + 1) - Yn. When Kn is greater than zero, it is a positive zero crossing. When Kn is less than zero, it is a negative zero crossing.

[0121] (5) Calculate 3072 sampling points in sequence to mark the positive and negative voltage zero-crossing point arrays.

[0122] Step 6: The method for sampling the zero-crossing point of the fundamental voltage sine wave voltage is as follows

[0123] (1) Cycle diagram Figure 1 :

[0124] T1~T3: the time period from the last positive zero crossing point to the next negative zero crossing point in sequence;

[0125] F1~F3: The time period from the last reverse zero crossing point to the next forward zero crossing point in sequence;

[0126] t1~t3: the time period from the last positive zero crossing point to the next positive zero crossing point in sequence;

[0127] f1~f3: the time period from the last reverse zero crossing point to the next reverse zero crossing point in sequence.

[0128] Since the 50Hz fundamental sine wave is a 20ms periodic function, when there is no interference such as harmonics superposition:

[0129] T1=T2=T3=F1=F2=F3=10ms; t1=t2=t3=tn=f1=f2=f3=20ms.

[0130] When there is superposition of harmonics or notch interference, the period of the 50Hz fundamental sine wave will not be changed:

[0131] T1=T2=T3, F1=F2=F3; T1≠F1; T2≠F2; T3≠F3; T1+F1=T2+F2=T3+F3=20ms.

[0132] (2) When the fundamental voltage sinusoidal waveform is sampled for three cycles through program control, the zero-crossing point array Z1-Z5, since the sampling starting point is random, the starting point may be sampled from either the positive half cycle or the negative half cycle, so the first voltage zero-crossing point array obtained by sampling may be either positive or reverse.

[0133] (3) If the sampling start point starts from the negative half cycle, the voltage zero-crossing point array starts from Z1 to Z5, and goes through two sine wave cycles, including three positive voltage zero-crossing point arrays Z1, Z3, and Z5 and two negative voltage zero-crossing point arrays Z2 and Z4. If t1 = t2 is approximately equal to 20ms, the time of the positive voltage zero-crossing point array Z7 in the third cycle is the Z5 time plus t1.

[0134] (4) If the sampling start point starts from the positive half cycle, the voltage zero-crossing point array starts from Z2 to Z6, and goes through two sine wave cycles, including three reverse voltage zero-crossing point arrays Z2, Z4, and Z6 and two forward voltage zero-crossing point arrays Z3 and Z5. If f1 = f2 is approximately equal to 20ms, the time of the reverse voltage zero-crossing point array Z8 in the third cycle is the Z6 time plus f1.

[0135] Embodiment 2:

[0136] The method of Example 2 is the same as that of Step 1 to Step 5 of Example 1, except that Step 6 is changed.

[0137] like Figure 3 It is the waveform diagram of three cycles after the 50Hz fundamental voltage sine wave is superimposed with the notch wave.

[0138] t1~t3: The time period from the zero crossing point of the previous fundamental voltage sine wave positive half cycle or the notch zero crossing point at the zero crossing point of the fundamental voltage sine wave positive half cycle to the zero crossing point of the next fundamental voltage sine wave positive half cycle or the notch zero crossing point at the zero crossing point of the fundamental voltage sine wave positive half cycle.

[0139] f1~f3: The time period from the previous fundamental voltage sine wave negative half-cycle zero-crossing point or the notch zero-crossing point at the negative half-cycle zero-crossing point of the fundamental voltage sine wave to the next fundamental voltage sine wave negative half-cycle zero-crossing point or the notch zero-crossing point at the negative half-cycle zero-crossing point of the fundamental voltage sine wave.

[0140] Since the fundamental voltage sine wave is a 20ms periodic function, the period of the 50Hz fundamental sine wave will not be changed when notch interference is superimposed, that is: T1=T2=T3, F1=F2=F3.

[0141] According to the above rules, the following calculation method can be obtained:

[0142] like Figure 4 : 50Hz fundamental voltage superimposed notch positive half cycle waveform.

[0143] The notch pattern will increase the number of positive and negative voltage zero-crossing point arrays, so it cannot be calculated using the method of Example 1.

[0144] 1. If Figure 4 and Figure 5 , when the sampling starting point is sampled from the negative half cycle to the positive half cycle, the Z1 voltage zero-crossing point array is a positive voltage zero-crossing point array, the Z2 voltage zero-crossing point array is a negative voltage zero-crossing point array, and the Z3 voltage zero-crossing point array is a positive voltage zero-crossing point array. There are three situations for judging Z1-Z3:

[0145] (a) If there are two or more consecutive voltage zero-crossing point arrays Z2 and Z3 within 20 sampling points after the voltage zero-crossing point array Z1, and the K values ​​are opposite, then Z1 can be considered to be the notch voltage zero-crossing point array at the zero-crossing point of the positive half-cycle of the 50Hz fundamental voltage.

[0146] (b) If there are no Z2 or Z3 voltage zero-crossing point arrays within 20 sampling points after the Z1 voltage zero-crossing point array, then Z1 is the 50Hz fundamental voltage positive half-cycle voltage zero-crossing point array. If there are two or more consecutive voltage zero-crossing point arrays Z4 and Z5 outside of the 20 sampling points after the Z1 voltage zero-crossing point array, and the K values ​​are opposite, it is necessary to determine whether it is a notch voltage zero-crossing point array at a non-50Hz fundamental voltage positive half-cycle zero-crossing point.

[0147] (c) The notch voltage zero-crossing point array at the zero-crossing point of the non-50Hz fundamental voltage positive half-cycle needs to confirm two conditions: one is that there are more than or equal to 2 consecutive voltage zero-crossing point arrays with opposite K values ​​(such as Z4 and Z5), and the other is that the 20 sampling points Yn before and after the voltage zero-crossing point array (such as Z4 and Z5) are all positive values. Therefore, it can be determined that Z4 and Z5 are notch voltage zero-crossing point arrays at the zero-crossing point of the non-50Hz fundamental voltage positive half-cycle.

[0148] 2. If Figure 6 : 50Hz fundamental voltage superimposed notch negative half cycle waveform.

[0149] If the sampling start point is from the positive half cycle to the negative half cycle, the Z6 voltage zero-crossing point array is a reverse voltage zero-crossing point array, the Z7 voltage zero-crossing point array is a forward voltage zero-crossing point array, and the Z8 voltage zero-crossing point array is a reverse voltage zero-crossing point array.

[0150] (a) If there are two or more consecutive voltage zero-crossing point arrays Z7 and Z8 within 20 sampling points after the voltage zero-crossing point array Z6, and the K values ​​are opposite, then it is determined that Z6 is the notch voltage zero-crossing point array at the zero-crossing point of the negative half-cycle of the 50Hz fundamental voltage.

[0151] (b) If there are no Z7 or Z8 voltage zero-crossing point arrays within 20 sampling points after the Z6 voltage zero-crossing point array, then Z6 is the 50Hz fundamental voltage negative half-cycle voltage zero-crossing point array. If there are more than or equal to 2 consecutive voltage zero-crossing point arrays Z9 and Z10 outside the 20 sampling points after the Z6 voltage zero-crossing point array, and the K values ​​are opposite, it is necessary to determine whether Z9 and Z10 are not the 50Hz fundamental voltage negative half-cycle zero-crossing point notch voltage zero-crossing point arrays.

[0152] (c) The notch voltage zero-crossing point array at the zero-crossing point of the negative half-cycle of the non-50Hz fundamental voltage needs to confirm two conditions: one is that there are more than or equal to 2 consecutive voltage zero-crossing point arrays with opposite K values, such as the Z9 and Z10 arrays in the figure; the other is that the 20 sampling points Yn before and after the voltage zero-crossing point array (such as Z9 and Z10) are all negative values.

[0153] Therefore, it can be judged that the Z9 and Z10 arrays are not the zero-crossing arrays of the notch voltage at the zero point of the negative half-cycle of the 50Hz fundamental voltage.

[0154] (6) In summary, no matter where the sampling start point starts, all 50Hz fundamental voltage positive half-cycle voltage zero-crossing point arrays or 50Hz fundamental voltage positive half-cycle notch voltage zero-crossing point arrays are found in sequence within the 60ms period, and the first 50Hz fundamental voltage positive half-cycle voltage zero-crossing point array or 50Hz fundamental voltage positive half-cycle notch voltage zero-crossing point array is used as the calculation starting point, and the period value between them is calculated to infer the next 50Hz fundamental voltage positive half-cycle voltage zero-crossing point array or 50Hz fundamental voltage positive half-cycle notch voltage zero-crossing point array.

[0155] Similarly, all 50Hz fundamental voltage negative half cycle voltage zero-crossing point arrays or 50Hz fundamental voltage negative half cycle zero-crossing point notch voltage zero-crossing point arrays can be found in sequence within a 60ms period. Then, the first 50Hz fundamental voltage negative half cycle voltage zero-crossing point array or 50Hz fundamental voltage negative half cycle zero-crossing point notch voltage zero-crossing point array is used as the calculation starting point and the period value between them is calculated to infer the next 50Hz fundamental voltage negative half cycle voltage zero-crossing point array or 50Hz fundamental voltage negative half cycle zero-crossing point notch voltage zero-crossing point array.

[0156] Embodiment 3:

[0157] like Figure 7 It is a three-cycle waveform diagram of the 50Hz fundamental voltage sine wave superimposed with harmonics, and the zero-crossing sampling point is marked.

[0158] When the 50 Hz fundamental voltage sine wave is superimposed with harmonics, the number of the forward voltage zero-crossing point array and the reverse voltage zero-crossing point array in the sampling period is the same as that of the fundamental voltage sine wave and is calculated using the method of Example 1.

[0159] This embodiment is used to calculate the situation where the number of positive voltage zero-crossing point arrays and reverse voltage zero-crossing point arrays after the 50 Hz fundamental voltage sine wave is superimposed with harmonics within a sampling period is greater than that of the fundamental voltage sine wave.

[0160] t1~t3: The time period from the harmonic zero-crossing point at the zero-crossing point of the previous 50Hz fundamental voltage positive half-cycle to the harmonic zero-crossing point at the zero-crossing point of the next 50Hz fundamental voltage positive half-cycle.

[0161] Since the 50Hz fundamental voltage sine wave is a 20ms periodic function, when harmonic interference is superimposed, the period of the 50Hz fundamental voltage will not be changed, that is, t1=t2=t3.

[0162] According to the above principle, the calculation method of this embodiment is as follows:

[0163] like Figure 8 Shown: Enlarged view of the 50Hz fundamental voltage sine wave superimposed on the harmonic positive half-cycle waveform.

[0164] There are several sampling points in the figure. When there are superimposed harmonics near the zero-crossing point of the 50Hz fundamental voltage sine wave, we need to find the harmonic voltage zero-crossing point array at the zero-crossing point, the sampling value sequence number Xn, the zero-crossing slope value Kn, record Z1{Xn, Kn}; Z2{Xn+2, Kn+1}; Z3{Xn+4, Kn+2}; Z4{Xn+6, Kn+3}; Z5{Xn+8, Kn+4}; Z6{Xn+10, Kn+5}; Z7{Xn+12, Kn+6}; Z8{Xn+14, Kn+7}.

[0165] (1) If the sampling starting point is from the negative half cycle to the positive half cycle: the Z1 voltage zero-crossing point array is the positive voltage zero-crossing point array, the Z2 voltage zero-crossing point array is the negative voltage zero-crossing point array, the Z3 voltage zero-crossing point array is the positive voltage zero-crossing point array, the Z4 is the negative voltage zero-crossing point array, and the Z5 voltage zero-crossing point array is the positive voltage zero-crossing point array.

[0166] Since the harmonic voltage zero-crossing point array at the zero-crossing point of the 50Hz fundamental voltage positive half-cycle is a positive voltage zero-crossing point array regardless of whether odd or even harmonics are superimposed, if there is a positive voltage zero-crossing point array among Z1-Z5, such as Z3, then at least 10 preceding sampling values ​​Yn of this voltage zero-crossing point array are less than 2.5V, and at least 10 succeeding sampling values ​​Yn are greater than 2.5V, then it is determined that Z3 is the harmonic voltage zero-crossing point array at the zero-crossing point of the 50Hz fundamental voltage positive half-cycle.

[0167] If the sampling start point is from the positive half cycle to the negative half cycle, Z7 is the harmonic voltage zero-crossing point array at the zero-crossing point of the negative half cycle of the 50Hz fundamental voltage. Since the harmonic voltage zero-crossing point array at the zero-crossing point of the negative half cycle of the 50Hz fundamental voltage when odd harmonics are superimposed is a reverse voltage zero-crossing point array, and the harmonic voltage zero-crossing point array at the zero-crossing point of the negative half cycle of the 50Hz fundamental voltage when even harmonics are superimposed is a forward voltage zero-crossing point array, no judgment is made in this case.

[0168] (3) Regardless of where the sampling start point begins, the harmonic voltage zero-crossing point arrays at all zero-crossing points of the 50 Hz fundamental voltage positive half-cycle are found in sequence within a 60 ms period in the above manner, and then the harmonic voltage zero-crossing point array at the zero-crossing point of the first 50 Hz fundamental voltage positive half-cycle is used as the calculation starting point, and the period value between them is calculated to infer the harmonic voltage zero-crossing point array at the zero-crossing point of the next 50 Hz fundamental voltage positive half-cycle.

[0169] Embodiment 4: A fundamental voltage zero-crossing point automatic detection system includes a sampling unit, which performs voltage sampling according to a sampling frequency and determines a sampling point;

[0170] The judgment unit judges the sampling point to determine the zero-crossing point array; judges the zero-crossing point array to determine the positive and negative zero-crossing point array; judges the zero-crossing point array to determine the fundamental voltage zero-crossing point array or the notch zero-crossing point array at the fundamental voltage zero-crossing point or the harmonic zero-crossing point array at the fundamental voltage zero-crossing point;

[0171] A zero-crossing array storage unit is used to store sampling point data, zero-crossing array data, forward and reverse zero-crossing data, and a fundamental voltage zero-crossing array or a notch zero-crossing array at the fundamental voltage zero-crossing point or a harmonic zero-crossing array at the fundamental voltage zero-crossing point;

[0172] The main control unit controls the operation of the sampling unit, the zero-crossing point array storage unit and the judgment unit.

[0173] It should be noted that the values ​​of Zn, Yn, Xn, Tn, Fn, tn, fn, etc. appearing in Examples 1 to 3 have the same meaning in different examples, but the specific parameters need to be treated separately, that is, although Z1 in Example 2 and Z1 in Example 3 are both expressed as voltage zero-crossing arrays, Z1 in Example 2 specifically represents the voltage zero-crossing array after superimposing notches, and Z1 in Example 3 represents the voltage zero-crossing array after superimposing harmonics, and the other parameters are understood in the same way. Parameters in different examples should not be confused.

[0174] The "one embodiment" or "embodiment" mentioned in the specification means that the specific features, structures or characteristics described in conjunction with the embodiment are included in at least one embodiment of the present invention. Therefore, the phrases "one embodiment" or "embodiment" appearing in various places throughout the specification do not necessarily refer to the same embodiment.

[0175] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the present invention.

[0176] In addition, it should be noted that the shapes and names of the parts and components of the specific embodiments described in this specification may be different. Any equivalent or simple changes made based on the structure, features and principles described in the patent concept of the present invention are included in the protection scope of the patent of the present invention. The technicians in the technical field of the present invention can make various modifications or supplements to the specific embodiments described or replace them in a similar manner, as long as they do not deviate from the structure of the present invention or exceed the scope defined by the claims, they should all fall within the protection scope of the present invention.

Claims

1. A method for automatically detecting the zero-crossing point of a fundamental voltage, characterized in that: Here are the steps: Step 1, determining the periodic function characteristics of the sampling waveform; Step 2, sampling the AC voltage signal through the single chip microcomputer; Step 3, calibrating the single chip microcomputer power supply reference value to eliminate the reference deviation; Step 4, sampling at least two cycles, obtaining a number of sampling points, marking each sampling point and the plane coordinates of the sampling point; Step 5, comparing the plane Y coordinates of two adjacent sampling points with the single-chip power supply reference value to determine whether the sampling point is a zero-crossing point, and then performing a slope calculation on the plane XY coordinates of the adjacent sampling points to determine whether it is a positive zero-crossing or a reverse zero-crossing, and obtaining a zero-crossing point array Zn using the plane X coordinates of the zero-crossing point and the slope K; the zero-crossing point array Zn represents the plane graphic meaning of the zero-crossing point; Step 6, judging the positive and negative voltage zero-crossing point arrays according to the periodic function characteristics of the sampling waveform, and eliminating the interference voltage zero-crossing point arrays; Step 7, respectively find out the fundamental voltage zero-crossing array or the notch zero-crossing array at the fundamental voltage zero-crossing point or the harmonic zero-crossing array at the fundamental voltage zero-crossing point in the order of the sampling period, take the first fundamental voltage zero-crossing array or the notch zero-crossing array at the fundamental voltage zero-crossing point or the harmonic zero-crossing array at the fundamental voltage zero-crossing point as the calculation starting point, calculate the period value between the fundamental voltage zero-crossing array or the notch zero-crossing array at the fundamental voltage zero-crossing point or the harmonic zero-crossing array at the fundamental voltage zero-crossing point, and deduce the fundamental voltage zero-crossing array or the notch zero-crossing array at the fundamental voltage zero-crossing point or the harmonic zero-crossing array at the fundamental voltage zero-crossing point of the next period; When the sampling starting point is sampled from the negative half cycle to the positive half cycle, if there are more than or equal to 2 continuous voltage zero-crossing point arrays within x sampling points after the Zn voltage zero-crossing point array, and the K values ​​in the two continuous voltage zero-crossing point arrays are opposite, then Zn is the notch voltage zero-crossing point array at the zero-crossing point of the positive half cycle of the fundamental voltage sine wave; if there is no voltage zero-crossing point array within x sampling points after the Zn voltage zero-crossing point array, then Zn is the zero-crossing point array of the positive half cycle of the fundamental voltage sine wave; if there is a positive voltage zero-crossing point array among all the voltage zero-crossing point arrays, at least j preceding sampling values ​​of this voltage zero-crossing point array are less than the voltage reference reference value, and at least j succeeding sampling values ​​are greater than the voltage reference reference value, then the positive voltage zero-crossing point array is the harmonic zero-crossing point array at the zero-crossing point of the positive half cycle of the fundamental voltage sine wave.

2. The method for automatically detecting the zero-crossing point of fundamental voltage according to claim 1, characterized in that: Step 7.1: Taking the first zero-crossing point array of the same-direction fundamental voltage or the zero-crossing point array of the notch wave at the zero-crossing point of the same-direction fundamental voltage or the zero-crossing point array of the harmonic wave at the zero-crossing point of the same-direction fundamental voltage as the calculation starting point, calculate the period value between the zero-crossing point arrays of the same direction between each other in the first and second sampling periods; Step 7.2: Set the allowable error and compare the two calculated same-direction period values; Step 7.3: If the two period values ​​are the same within the error range, go to step 7.4; if the two period values ​​are different, go to step 7.5; Step 7.4: Calculate the zero-crossing point array of the same-direction fundamental voltage or the zero-crossing point array of the same-direction fundamental voltage or the zero-crossing point array of the harmonics at the zero-crossing point of the same-direction fundamental voltage in the next cycle based on this cycle; Step 7.5: Using the slip method, continue one sampling cycle, compare the period values ​​between the zero-crossing point arrays in the same direction between the second and third sampling cycles, and proceed to step 7.3 for judgment.

3. The method for automatically detecting the zero-crossing point of fundamental voltage according to claim 1, characterized in that: The method to calculate the positive zero-crossing point array and the negative zero-crossing point array is as follows: When the preceding sampling value Yn is less than the reference value and the succeeding sampling value Yn+1 is greater than or equal to the reference value, it is a positive zero crossing; The preceding sampling value Yn is greater than the reference value, and the succeeding sampling value Yn+1 is less than or equal to the reference value, which is a reverse zero crossing; The positive and negative zero-crossing point array Zn includes the previous sampling value sequence number Xn and the corresponding zero-crossing slope value Kn, forming an array Zn{Xn, Kn}, Kn={(Yn+1)-Yn} / {(Xn+1)-Xn}, Kn is greater than zero for positive zero crossing, and Kn is less than zero for reverse zero crossing.

4. The method for automatically detecting the zero-crossing point of fundamental voltage according to claim 1, 2 or 3, characterized in that: If the sampling starting point starts from the negative half cycle of the fundamental voltage sine wave, Zn is the voltage zero-crossing point array, and the sampling period includes n voltage reverse zero-crossing point arrays and n+1 voltage positive zero-crossing point arrays, then the fundamental voltage positive zero-crossing point array plus tn is equal to the next fundamental voltage positive zero-crossing point array, and the fundamental voltage reverse zero-crossing point array plus fn is equal to the next fundamental voltage positive zero-crossing point array; Among them, tn is the time period from the previous fundamental wave positive zero-crossing point array to the next fundamental wave positive zero-crossing point array; fn is the time period from the previous fundamental wave negative zero-crossing point array to the next fundamental wave negative zero-crossing point array.

5. The method for automatically detecting the zero-crossing point of fundamental voltage according to claim 1, 2 or 3, characterized in that: When the sampling starting point is sampled from the positive half cycle to the negative half cycle, if there are more than or equal to 2 continuous voltage zero-crossing point arrays within x sampling points after the Zn voltage zero-crossing point array, and the K value is opposite, then it is judged that Zn is the notch voltage zero-crossing point array at the zero-crossing point of the negative half cycle of the fundamental voltage; If there are no two consecutive voltage zero-crossing point arrays within x sampling points after the Zn voltage zero-crossing point array, it is determined that Zn is the fundamental voltage negative half-cycle zero-crossing point array; wherein the AC voltage signal includes 50Hz or 60Hz.

6. The method for automatically detecting the zero-crossing point of fundamental voltage according to claim 1, 2 or 3, characterized in that: When the sampling starting point is from the negative half cycle to the positive half cycle: If there are more than or equal to 2 continuous voltage zero-crossing point arrays outside of x sampling points after the Zn voltage zero-crossing point array, the K values ​​of the two continuous voltage zero-crossing point arrays are opposite, and the x sampling point values ​​before and after the two continuous voltage zero-crossing point arrays are all positive values, then Zn is a notch zero-crossing point array at the zero-crossing point of the positive half-cycle of the non-fundamental voltage sine wave.

7. The method for automatically detecting the zero-crossing point of fundamental voltage according to claim 3, characterized in that: When the sampling starting point is sampling from the positive half cycle to the negative half cycle: If there are more than or equal to 2 continuous voltage zero-crossing point arrays outside of x sampling points after the Zn voltage zero-crossing point array, the K values ​​of the two continuous voltage zero-crossing point arrays are opposite, and the x sampling points Yn before and after the two continuous voltage zero-crossing point arrays are all negative values, then Zn is a notch zero-crossing point array at the zero point of the negative half-cycle of the non-fundamental voltage sine wave.

8. The method for automatically detecting the zero-crossing point of fundamental voltage according to claim 7, characterized in that: The value of j is greater than: a value obtained by dividing a cycle time by the maximum number of superimposed harmonics by the sampling period, and then dividing the value by 2.

9. The method for automatically detecting the zero-crossing point of fundamental voltage according to claim 5, characterized in that: The value of x is greater than: a value obtained by dividing the period of the oscillation waveform generated by the zero-crossing notch by the sampling period.

10. A fundamental voltage zero-crossing automatic detection system, characterized in that: Used to implement the method for automatically detecting the zero-crossing point of the fundamental voltage as described in any one of claims 1 to 9; It includes a sampling unit, which performs voltage sampling according to a sampling frequency and determines a sampling point; A judgment unit judges the sampling points and determines the zero-crossing point array; Judge the zero-crossing point array and determine the positive and negative zero-crossing point arrays; The zero-crossing point array is judged to determine the fundamental voltage zero-crossing point array or the notch zero-crossing point array at the fundamental voltage zero-crossing point or the harmonic zero-crossing point array at the fundamental voltage zero-crossing point; A zero-crossing array storage unit is used to store sampling point data, zero-crossing array data, forward and reverse zero-crossing data, and a fundamental voltage zero-crossing array or a notch zero-crossing array at the fundamental voltage zero-crossing point or a harmonic zero-crossing array at the fundamental voltage zero-crossing point; The main control unit controls the operation of the sampling unit, the zero-crossing point array storage unit and the judgment unit.