Harmonic phase angle calculation method, device, storage medium and equipment

By performing discrete sampling and vector superposition of voltage signals, the harmonic phase angle is calculated, which solves the problem of large error in harmonic phase angle measurement in the existing technology, realizes high-precision measurement, and is suitable for dynamic characteristics analysis in the fields of power grids and other fields. .

CN115144653BActive Publication Date: 2024-11-08STATE GRID BEIJING ELECTRIC POWER CO +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210583174.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2024-11-08
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

In the prior art, the measurement error of harmonic phase angle is large, which seriously affects its expansion and application effect, and no effective solution is found.

Method used

By discrete sampling of the voltage signal based on a predetermined sampling period, the single-period wave of the voltage signal is determined, and the initial harmonic phase angle is calculated based on the unit cosine function, and then multiple initial phase angles are vector superimposed to obtain the target harmonic phase horn.

Benefits of technology

It realizes high-precision measurement of harmonic phase angle, reduces measurement errors, improves the measurement accuracy of harmonic phase angle, and is suitable for dynamic characteristic analysis in the fields of power grids and other fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115144653B_ABST
    Figure CN115144653B_ABST
Patent Text Reader

Abstract

The present invention discloses a harmonic phase angle calculation method, device, storage medium and equipment. The method includes: based on a predetermined sampling period, discrete sampling processing is performed on a voltage signal to obtain multiple sampling signals; based on the multiple sampling signals, a single cycle of the voltage signal is determined, and the zero time of the fundamental wave rising edge of the voltage signal is calculated according to the single cycle of the voltage signal; the voltage signal is multiplied and accumulated according to the unit sine and cosine function to obtain the initial harmonic phase angle of the voltage signal, wherein the unit sine and cosine function is a unit sine and cosine function of the harmonic frequency of the voltage signal obtained by constructing the zero time as the delay time; multiple initial harmonic phase angles are vector-superimposed to obtain the target harmonic phase angle. The present invention solves the technical problem that the measurement error of the harmonic phase angle in the prior art is large, which seriously affects the effect of its expanded application.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spectrum analysis of power grid harmonic signals, and in particular to a harmonic phase angle calculation method, device, storage medium and equipment. Background Art

[0002] Harmonics are a long-standing power quality problem in power systems. With the rapid development of power electronics technology, a large number of power electronics devices are widely used in power grids, industries and homes, and harmonic pollution is becoming more and more serious. The development of various types of new energy power generation (photovoltaic, wind power, etc.) and electric vehicle charging piles based on power electronics technology has reached a new height, but it has also brought new problems such as the complexity and high frequency of harmonics.

[0003] In the existing technology, the harmonic amplitude is mainly restricted, and indicators such as harmonic content rate and total harmonic distortion rate are extended. However, there is no research on the accuracy of phase angle measurement. The error in the measurement of harmonic phase angle will directly affect its expanded application effect.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The embodiments of the present invention provide a harmonic phase angle calculation method, device, storage medium and equipment to at least solve the technical problem in the prior art that the measurement error of the harmonic phase angle is large, which seriously affects its expanded application effect.

[0006] According to one aspect of an embodiment of the present invention, a harmonic phase angle calculation method is provided, comprising: based on a predetermined sampling period, discretely sampling a voltage signal to obtain a plurality of sampling signals; determining a single cycle of the voltage signal based on the plurality of sampling signals, and obtaining a fundamental wave rising edge zero time of the voltage signal according to the single cycle calculation of the voltage signal; performing product and accumulation calculations on the voltage signal according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, wherein the unit sine and cosine function is a unit sine and cosine function of the harmonic frequency of the voltage signal constructed by taking the zero time as a delay time; and performing vector superposition processing on the plurality of initial harmonic phase angles to obtain a target harmonic phase angle.

[0007] Optionally, determining the single cycle of the voltage signal based on the multiple sampling signals includes: selecting a first target sampling signal from the multiple sampling signals based on a preset rule, wherein the preset rule is that the voltage signal of the selected target sampling signal is greater than or equal to 0, and the voltage signal of the previous adjacent sampling signal of the target sampling signal is less than 0; using the first target sampling signal as a starting sampling signal; selecting a second target sampling signal from the multiple sampling signals that is after the first target sampling signal and satisfies the preset rule; using the second target sampling signal as a cutoff sampling signal; and determining the single cycle of the voltage signal based on the starting sampling signal and the cutoff sampling signal.

[0008] Optionally, the zero point time of the fundamental rising edge of the voltage signal is calculated based on a single cycle of the voltage signal, including: performing discrete Fourier transform on the sampling signals within the single cycle of the voltage signal to obtain the fundamental initial phase of the voltage signal; calculating the fundamental frequency based on the number of sampling signals within the single cycle of the voltage signal; constructing a unit fundamental sine function of the voltage signal based on the fundamental frequency and the fundamental initial phase; and calculating the zero point time when the function value of the rising edge of the fundamental sine function is zero.

[0009] Optionally, the unit sine and cosine function of the harmonic frequency of the voltage signal obtained by constructing the zero point as the delay time includes: performing time delay processing according to the delay time to construct a unit sine and cosine function of the harmonic frequency of a preset number, wherein the preset number is greater than one.

[0010] Optionally, the voltage signal is multiplied and accumulated according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, including: calculating the product of the voltage signal corresponding to each sampling signal in the unit sine and cosine function; summing the product of the voltage signal in the unit sine and cosine function to obtain a sine DC component and a cosine DC component; and calculating the initial harmonic phase angle based on the sine DC component and the cosine DC component.

[0011] Optionally, vector superposition processing is performed on the multiple initial harmonic phase angles mentioned above to obtain a target harmonic phase angle, including: selecting a preset number of continuous and non-overlapping initial harmonic phase angles mentioned above to construct a calculation unit; and vector superposition processing is performed on the initial harmonic phase angles in the calculation unit to obtain a target harmonic phase angle.

[0012] According to another aspect of an embodiment of the present invention, a harmonic phase angle calculation method is also provided, including: a sampling module, used to perform discrete sampling processing on a voltage signal based on a predetermined sampling period to obtain multiple sampling signals; a processing module, used to determine a single cycle of the voltage signal based on the multiple sampling signals, and obtain the zero point time of the fundamental rising edge of the voltage signal according to the single cycle calculation of the voltage signal; a calculation module, used to perform product and accumulation calculation processing on the voltage signal according to a unit sine and cosine function to obtain an initial harmonic phase angle of the above-mentioned voltage signal, wherein the above-mentioned unit sine and cosine function is a unit sine and cosine function of the harmonic frequency of the above-mentioned voltage signal constructed by taking the above-mentioned zero point time as the delay time; a superposition module, used to perform vector superposition processing on multiple of the above-mentioned initial harmonic phase angles to obtain a target harmonic phase angle.

[0013] According to another aspect of an embodiment of the present invention, a non-volatile storage medium is further provided. The non-volatile storage medium stores a plurality of instructions. The instructions are suitable for being loaded by a processor and executing any one of the above-mentioned harmonic phase angle calculation methods.

[0014] According to another aspect of an embodiment of the present invention, a processor is further provided, and the processor is used to run a program, wherein the program is configured to execute any one of the above-mentioned harmonic phase angle calculation methods when running.

[0015] According to another aspect of an embodiment of the present invention, there is further provided an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute any one of the above-mentioned harmonic phase angle calculation methods.

[0016] In an embodiment of the present invention, a voltage signal is discretely sampled based on a predetermined sampling period to obtain a plurality of sampling signals; a single cycle of the voltage signal is determined based on the plurality of sampling signals, and the zero time of the fundamental wave rising edge of the voltage signal is calculated based on the single cycle of the voltage signal; the voltage signal is multiplied and accumulated according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, wherein the unit sine and cosine function is a unit sine and cosine function of the harmonic frequency of the voltage signal constructed by taking the zero time as the delay time; a plurality of the initial harmonic phase angles are vector-superimposed to obtain a target harmonic phase angle, thereby achieving the purpose of improving the measurement accuracy of the harmonic phase angle, thereby realizing the technical effect of high-precision measurement of the harmonic phase angle, and further solving the technical problem in the prior art that the measurement error of the harmonic phase angle is large and seriously affects the effect of its expanded application. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1 is a flow chart of a method for calculating harmonic phase angle according to an embodiment of the present invention;

[0019] Figure 2 It is a schematic diagram of an optional method for determining the start and end time of a single cycle of a voltage signal according to an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of an optional voltage waveform according to an embodiment of the present invention;

[0021] Figure 4 is a cycle diagram of an optional voltage waveform amplification region 1 according to an embodiment of the present invention;

[0022] Figure 5 is a schematic diagram of a cycle of an optional voltage waveform amplification region 2 according to an embodiment of the present invention;

[0023] Figure 6 is a schematic diagram of an optional harmonic phase angle and corresponding error according to an embodiment of the present invention;

[0024] Figure 7 4 is a schematic diagram of the structure of a harmonic phase angle calculation device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0025] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0027] Example 1

[0028] According to an embodiment of the present invention, an embodiment of a harmonic phase angle calculation method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0029] Figure 1 is a flow chart of a method for calculating harmonic phase angle according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0030] Step S102, based on a predetermined sampling period, discretely sampling the voltage signal to obtain a plurality of sampling signals;

[0031] Step S104, determining a single cycle of the voltage signal based on the plurality of sampling signals, and calculating a zero point time of a fundamental wave rising edge of the voltage signal according to the single cycle of the voltage signal;

[0032] Step S106, performing product and accumulation calculation processing on the voltage signal according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, wherein the unit sine and cosine function is a unit sine and cosine function of the harmonic frequency of the voltage signal constructed by taking the zero point as the delay time;

[0033] Step S108, performing vector superposition processing on the multiple initial harmonic phase angles to obtain a target harmonic phase angle.

[0034] In an embodiment of the present invention, the executor of the harmonic phase angle calculation method provided in the above steps S102 to S108 is a harmonic phase angle calculation system, and the above system is used to perform discrete sampling processing on the voltage signal based on a predetermined sampling period, and the delay time of the unit sine and cosine function used to construct the harmonic frequency of the voltage signal is calculated for the multiple sampling signals obtained by sampling, and the harmonic phase angle of the voltage signal is calculated according to the above unit sine and cosine function, and finally, multiple continuous and non-repetitive harmonic phase angles are selected to calculate their superimposed phase angle, and the above superimposed phase angle is used as the final harmonic phase angle.

[0035] It should be noted that each of the above-mentioned sampling signals corresponds to a sampling point; the above-mentioned predetermined sampling period can be set according to actual conditions. For the measurement of harmonics, the current sampling frequency f s Not less than 12.8kHz, and the corresponding equal-interval sampling time interval is not greater than T s =1 / f s , i.e. 78.125ns; the above delay time is the delay time of the unit sine and cosine function for constructing the harmonic frequency of the above voltage signal; the above rising edge zero point refers to the point at which the value of the fundamental component of the voltage signal is zero in the process of the voltage changing from negative to positive, and in addition, the point at which the value of the fundamental component of the voltage signal is zero in the process of the voltage changing from positive to negative is the falling edge zero point.

[0036] As an optional embodiment, the grid analog voltage signal is discretized by equally spaced sampling. The start and end times of the signal single-cycle discrete Fourier transform (DFT) analysis are determined by the sampling points where the adjacent voltage values ​​turn from negative to positive, and the initial phase of the fundamental component is obtained, and then the time corresponding to the zero point is calculated. Then, the zero point is used as the delay amount to construct a harmonic frequency unit sine and cosine function, and the harmonic phase angle of this cycle is calculated by multiplying and summing it with the corresponding sampled voltage point by point. Finally, 10 cycles are used as the analysis interval, and 10 groups of continuous non-overlapping harmonic phase angles are selected to construct a unit vector to calculate its superimposed phase angle as the harmonic phase angle of the 10-cycle analysis interval.

[0037] Through the embodiments of the present invention, the purpose of improving the measurement accuracy of the harmonic phase angle and taking into account the dynamic characteristics within the measurement and analysis time interval is achieved, ultimately reducing the measurement error and achieving high-precision measurement of the harmonic phase angle.

[0038] In an optional embodiment, the above-mentioned determination of the single cycle of the above-mentioned voltage signal based on the above-mentioned multiple sampling signals includes: selecting a first target sampling signal from the multiple above-mentioned sampling signals based on a preset rule, wherein the above-mentioned preset rule is that the above-mentioned voltage signal of the selected target sampling signal is greater than or equal to 0, and the above-mentioned voltage signal of the previous adjacent sampling signal of the above-mentioned target sampling signal is less than 0; using the above-mentioned first target sampling signal as a starting sampling signal; selecting a second target sampling signal from the multiple above-mentioned sampling signals that is after the above-mentioned first target sampling signal and satisfies the above-mentioned preset rule; using the above-mentioned second target sampling signal as a cutoff sampling signal; and determining the single cycle of the voltage signal based on the above-mentioned starting sampling signal and the above-mentioned cutoff sampling signal.

[0039] In the embodiment of the present invention, after obtaining multiple sampling signals, it is necessary to select a start sampling signal and a stop sampling signal from the multiple sampling signals according to a preset rule to determine a single cycle of the voltage signal, and each single cycle is used for subsequent calculation processing.

[0040] It should be noted that the above preset rule is that the voltage signal of the selected target sampling signal is greater than or equal to 0, and the voltage signal of the previous adjacent sampling signal of the target sampling signal is less than 0, that is, when the voltage value u(t n )≥0 and the voltage value of the previous adjacent sampling point u(t n-1 )<0, the sampling time t n , as the starting time of DFT analysis; then judge by each sampling point incrementally until the next sampling point that meets the requirements appears, that is, the voltage value u(t n+N )≥0 and the voltage value of the previous adjacent sampling point u(t n+N-1 )<0, the sampling time t n+N , as the cut-off point for DFT analysis.

[0041] As an optional embodiment, Figure 2 The schematic diagram of the method for determining the start and end time of a single cycle of a voltage signal is shown; each sampling signal corresponds to a sampling point, a time, and a voltage value; a sampling point whose voltage value is greater than or equal to 0 and whose voltage value of the previous adjacent sampling point is less than 0 is selected as the starting sampling point, and the next sampling point that meets the preset requirements is selected after the starting sampling point as the ending sampling point. All sampling points between the starting sampling point and the ending sampling point are regarded as sampling signals within the same single cycle of the voltage signal.

[0042] In an optional embodiment, the zero time of the fundamental rising edge of the above-mentioned voltage signal is calculated based on the single cycle of the above-mentioned voltage signal, including: performing discrete Fourier transform on the sampling signal within the single cycle of the above-mentioned voltage signal to obtain the fundamental initial phase of the above-mentioned voltage signal; calculating the fundamental frequency based on the number of sampling signals within the single cycle of the above-mentioned voltage signal; constructing a unit fundamental sine function of the above-mentioned voltage signal based on the above-mentioned fundamental frequency and the above-mentioned fundamental initial phase; calculating the zero time of the rising edge of the above-mentioned fundamental sine function, and using the time corresponding to the above-mentioned zero time as the above-mentioned delay time.

[0043] In the embodiment of the present invention, a discrete Fourier transform is performed on a plurality of sampling signals within a single cycle of the voltage signal to obtain the initial phase of the fundamental wave. The fundamental frequency f is calculated based on the number N of sampling signals within a single cycle of the voltage signal. 1 ; Based on the above fundamental frequency f 1 And the above fundamental initial phase Construct a unit fundamental sine function of the voltage signal; calculate the zero time of the rising edge of the fundamental sine function, and use the time corresponding to the zero time as the delay time of the unit sine and cosine function.

[0044] As an optional embodiment, Figure 2 As shown, in [t n ,t n+N ]The sampling data within the time is subjected to DFT analysis to obtain the initial phase of the fundamental wave According to the sampling sequence number N, calculate the fundamental frequency f of the voltage signal 1 , the calculation formula is as follows:

[0045]

[0046] Optional, with fundamental frequency f 1 and the fundamental initial phase Construct the unit fundamental sine function corresponding to the measured voltage signal within the cycle, and the calculation formula is as follows:

[0047]

[0048] Optionally, when the phase of the unit fundamental wave function is zero, the zero point of the rising edge of the fundamental wave component of the voltage signal of the analysis cycle is calculated, and the calculation formula is as follows:

[0049]

[0050] Optionally, the time corresponding to the above zero point moment is used as the delay time of the above unit sine and cosine functions.

[0051] In an optional embodiment, the unit sine and cosine function of the harmonic frequency of the voltage signal obtained by constructing the zero point as the delay time includes: performing time delay processing according to the delay time to construct a unit sine and cosine function of the harmonic frequency of a preset number, wherein the preset number is greater than one.

[0052] As an optional embodiment, a time delay is performed at zero time to construct a unit sine and cosine function u of the hth harmonic frequency. s,h 、u c,h , the calculation formula is as follows:

[0053]

[0054] In the formula, h is the harmonic order, h = 2, 3, 4, ...

[0055] As an optional embodiment, the unit sine and cosine function of the harmonic frequency is constructed with the zero time as the delay amount, and the harmonic phase angle of this cycle is calculated by point-by-point multiplication and summation of the unit sine and cosine function with the corresponding sampled voltage signal.

[0056] In an optional embodiment, the voltage signal is multiplied and accumulated according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, including: calculating the product of the voltage signal corresponding to each sampling signal in the unit sine and cosine function; summing the product of the voltage signal in the unit sine and cosine function to obtain a sine DC component and a cosine DC component; and calculating the initial harmonic phase angle according to the positive and negative conditions of the sine DC component and the cosine DC component.

[0057] In the embodiment of the present invention, the unit sine and cosine functions of the fundamental and harmonic frequencies are constructed and point-by-point multiplication and summation of the corresponding sampled voltage signals are performed to calculate the sinusoidal DC component DC of the hth harmonic. s,h and cosine DC component c,h , the calculation formula is as follows:

[0058]

[0059] As an optional embodiment, the harmonic phase angle is calculated based on the positive and negative conditions of the sine DC component and the cosine DC component. The harmonic phase angle calculation comparison table is as follows:

[0060] Table 1 Harmonic phase angle calculation comparison table

[0061]

[0062] In an optional embodiment, vector superposition processing is performed on the multiple initial harmonic phase angles mentioned above to obtain a target harmonic phase angle, including: selecting a preset number of continuous and non-overlapping initial harmonic phase angles to construct a calculation unit; and vector superposition processing is performed on the initial harmonic phase angles in the calculation unit to obtain a target harmonic phase angle.

[0063] In an embodiment of the present invention, a preset number of cycles are selected as analysis intervals, and a preset number of groups of continuous non-overlapping harmonic phase angles are selected to construct a unit vector to calculate its superposition phase angle as the harmonic phase angle of the selected preset number of cycle analysis intervals.

[0064] As an optional embodiment, according to the provisions of the Electrotechnical Commission standard IEC 61000-4-30 (GB / T 17626.30) that harmonics use 10 cycles as the basic analysis interval, 10 consecutive non-repeating single-cycle harmonic phase angles are selected as a group of calculation units. A group of harmonic phase angles is used to construct a group of unit vectors, and the phase angle of the vector superposition result is calculated as the harmonic phase angle of each phase of the 10 cycles. The calculation formula is as follows:

[0065]

[0066] Where: |e| is the modulus of the unit vector, |e|=1; arg[] is the phase angle operation of the vector; θ h is the hth harmonic phase angle at a 10-cycle analysis interval; m is the number of harmonic phase angle calculation units, and 10 cycles correspond to m=1, 2, 3, ..., 10.

[0067] As an optional embodiment, the initial phase of the fundamental component of the power grid signal measured by discrete sampling is used to determine the corresponding moment of its zero point, thereby reducing the harmonic phase angle measurement error caused by the zero point deviation at higher harmonic frequencies; at the same time, the dynamic change of its phase angle within the harmonic analysis interval (10 cycles) is considered to improve the measurement accuracy of the harmonic phase angle. For the research on harmonic emission characteristics, harmonic source identification, harmonic responsibility division, harmonic source location, multi-source superposition, harmonic power metering and harmonic loss evaluation, a more accurate harmonic phase angle measurement method is provided to meet the development needs of existing technologies.

[0068] As an optional embodiment, the following voltage signal is constructed:

[0069]

[0070] It should be noted that the above values ​​are only examples and can be modified according to actual needs.

[0071] Optionally, the functions corresponding to the fundamental and harmonic components of the constructed signal are known. If the fundamental of the constructed voltage is at time tz The phase is zero, that is, 2πf 1 t z +0.169π=0, at this time the fundamental component is also zero, this moment corresponds to the zero point of the fundamental wave, and the first moment t that meets the requirements can be calculated. z =18.31ms. According to the definition of harmonic phase angle in IEC 61000-3-12, substituting it into the harmonic component, the harmonic phase angle can be calculated as Assuming that the constructed signal is an unknown analog signal, the signal needs to be discretely sampled before phase angle analysis can be performed. The signal is sampled at equal intervals at t = 0, with a sampling frequency of 12.8k / Hz. The sampled voltage waveform is as follows Figure 3 As shown, in order to better show the situation of the sampling points around zero point, the adjacent measurement signal zero point (voltage changes from negative to positive) area is enlarged, that is, Figure 4 The enlarged area 1 and Figure 5 The enlarged area 2 shown, the start and end times of the first single-cycle DFT analysis are shown in Table 2:

[0072] Table 2 Single-cycle DFT analysis start and end times

[0073]

[0074] Optionally, according to Table 2, the sampling sequence corresponding to the voltage turning from negative to positive is selected. 238 and t 494 , as the start and end time of DFT analysis, the fundamental phase angle is Then, according to the difference in the number of start and end sampling sequences, N=494-238=256 is calculated, and the frequency of the fundamental wave is calculated as:

[0075]

[0076] Therefore, the unit sine function that constructs the fundamental component is:

[0077] u 1 (t) = sin[2π×50×(tt 274 )+0.0206π]

[0078] Optionally, the zero-crossing time of the fundamental wave rising edge corresponding to the voltage signal of the analysis cycle is calculated as:

[0079]

[0080] Optionally, at zero time t z The delay is the amount of delay, and the unit sine and cosine functions of the fundamental and harmonic frequencies are constructed. The point-by-point product and summation of the corresponding sampling voltages are used to calculate the sinusoidal DC component of the 5th harmonic. s,h=-1948.41 and cosine DC component DC c,h =-359.346, the calculation formula is as follows:

[0081]

[0082] Optional, according to Table 2, due to DC c,h <0, then the 5th harmonic phase angle corresponding to this cycle π(258.53°), since the construction signal does not change within 10 cycles, the harmonic phase angle of its 10 cycles is θ 5 =1.4363π(258.53°), the calculation formula is as follows:

[0083]

[0084] The 5th harmonic phase angle and corresponding error obtained by different methods are as follows Figure 6 As shown in the figure, the vertical axis represents the size of the 5th harmonic phase angle, and the horizontal axes represent the construction value, the traditional measurement method and the method of the embodiment of the present application. It can be seen that the error of the harmonic phase angle measurement method of the embodiment of the present application is much smaller than that of the traditional method.

[0085] Through the above steps, the initial phase of the fundamental component of the power grid signal measured by discrete sampling is used to determine the time corresponding to its zero point, and the unit sine and cosine function of the harmonic frequency is constructed with this delay. The point-by-point product and summation of the unit sine and cosine function with the corresponding sampling voltage and the phase angle operation of the unit vector superposition result constructed with multiple harmonic phase angles are performed, and the harmonic phase angle measurement with dynamic changes within the harmonic analysis interval is considered, so as to achieve the purpose of improving the measurement accuracy of the harmonic phase angle and taking into account the dynamic characteristics within the measurement and analysis time interval, and finally reduce the measurement error, and realize the high-precision measurement of the harmonic phase angle.

[0086] Example 2

[0087] According to an embodiment of the present invention, there is also provided an embodiment of a device for implementing the above harmonic phase angle calculation method. Figure 7 is a schematic diagram of the structure of a harmonic phase angle calculation device according to an embodiment of the present invention. Figure 7 As shown, the above device includes: a sampling module 70, a processing module 72, a calculation module 74 and a superposition module 76, wherein:

[0088] The sampling module 70 is used to perform discrete sampling processing on the voltage signal based on a predetermined sampling period to obtain a plurality of sampling signals;

[0089] A processing module 72, configured to determine a single cycle of the voltage signal based on the multiple sampling signals, and calculate a zero point time of a fundamental wave rising edge of the voltage signal according to the single cycle of the voltage signal;

[0090] A calculation module 74 is used to perform product and accumulation calculation processing on the voltage signal according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, wherein the unit sine and cosine function is a unit sine and cosine function of the harmonic frequency of the voltage signal constructed by taking the zero point as the delay time;

[0091] The superposition module 76 is used to perform vector superposition processing on the multiple initial harmonic phase angles to obtain a target harmonic phase angle.

[0092] It should be noted here that the above-mentioned sampling module 70, processing module 72, calculation module 74 and superposition module 76 correspond to steps S102 to S108 in Example 1, and the four modules and the corresponding steps implement the same instances and application scenarios, but are not limited to the contents disclosed in the above-mentioned Example 1.

[0093] It should be noted that the preferred implementation of this embodiment can refer to the relevant description in Example 1, which will not be repeated here.

[0094] According to an embodiment of the present invention, an embodiment of a computer-readable storage medium is also provided. Optionally, in this embodiment, the computer-readable storage medium can be used to store the program code executed by the harmonic phase angle calculation method provided in the above embodiment 1.

[0095] Optionally, in this embodiment, the computer-readable storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0096] Optionally, in this embodiment, the computer-readable storage medium is configured to store program codes for executing the following steps: based on a predetermined sampling period, discretely sampling the voltage signal to obtain multiple sampling signals; determining a single cycle of the voltage signal based on the multiple sampling signals, and calculating the zero time of the fundamental rising edge of the above-mentioned voltage signal according to the single cycle of the voltage signal; performing multiplication and accumulation calculations on the voltage signal according to a unit sine and cosine function to obtain an initial harmonic phase angle of the above-mentioned voltage signal, wherein the above-mentioned unit sine and cosine function is a unit sine and cosine function of the harmonic frequency of the above-mentioned voltage signal constructed by taking the above-mentioned zero time as the delay time; performing vector superposition processing on the above-mentioned multiple initial harmonic phase angles to obtain a target harmonic phase angle.

[0097] Optionally, the computer-readable storage medium is configured to store program codes for executing the following steps: selecting a first target sampling signal from the plurality of sampling signals based on a preset rule, wherein the preset rule is that the voltage signal of the selected target sampling signal is greater than or equal to 0, and the voltage signal of the previous adjacent sampling signal of the target sampling signal is less than 0; using the first target sampling signal as a starting sampling signal; selecting a second target sampling signal from the plurality of sampling signals that is after the first target sampling signal and satisfies the preset rule; using the second target sampling signal as a cutoff sampling signal; and determining a single cycle of the voltage signal based on the starting sampling signal and the cutoff sampling signal.

[0098] Optionally, the computer-readable storage medium is configured to store program codes for executing the following steps: performing a discrete Fourier transform on the sampling signals within a single cycle of the voltage signal to obtain a fundamental initial phase of the voltage signal; calculating the fundamental frequency based on the number of sampling signals within a single cycle of the voltage signal; constructing a unit fundamental sine function of the voltage signal based on the fundamental frequency and the fundamental initial phase; and calculating the zero point in the rising edge of the fundamental sine function when the function value is zero.

[0099] Optionally, the computer-readable storage medium is configured to store program codes for executing the following steps: performing time delay processing according to the delay time, and constructing unit sine and cosine functions of harmonic frequencies of a preset number, wherein the preset number is greater than one.

[0100] Optionally, the computer-readable storage medium is configured to store program codes for executing the following steps: calculating the product of the voltage signals corresponding to each sampling signal in the unit sine and cosine functions; summing the products of the voltage signals in the unit sine and cosine functions to obtain a sine DC component and a cosine DC component; and calculating the initial harmonic phase angle based on the sine DC component and the cosine DC component.

[0101] Optionally, the computer-readable storage medium is configured to store program codes for executing the following steps: selecting a preset number of continuous non-overlapping initial harmonic phase angles to construct a calculation unit; performing vector superposition processing on the initial harmonic phase angles in the calculation unit to obtain a target harmonic phase angle.

[0102] According to an embodiment of the present invention, an embodiment of a processor is also provided. Optionally, in this embodiment, the computer-readable storage medium may be used to store program codes executed by the harmonic phase angle calculation method provided in the first embodiment.

[0103] An embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, the following steps are implemented: based on a predetermined sampling period, discrete sampling processing is performed on a voltage signal to obtain a plurality of sampling signals; based on the plurality of sampling signals, a single cycle of the voltage signal is determined, and the zero time of the fundamental wave rising edge of the voltage signal is calculated based on the single cycle of the voltage signal; the voltage signal is multiplied and accumulated according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, wherein the unit sine and cosine function is a unit sine and cosine function of the harmonic frequency of the voltage signal obtained by taking the zero time as the delay time; and a plurality of the initial harmonic phase angles are vector-superimposed to obtain a target harmonic phase angle.

[0104] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: based on a predetermined sampling period, discretely sampling a voltage signal to obtain multiple sampling signals; determining a single cycle of the voltage signal based on the multiple sampling signals, and calculating the zero time of the fundamental rising edge of the voltage signal based on the single cycle of the voltage signal; performing product and accumulation calculations on the voltage signal according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, wherein the unit sine and cosine function is a unit sine and cosine function of the harmonic frequency of the voltage signal constructed by taking the zero time as the delay time; performing vector superposition processing on multiple initial harmonic phase angles to obtain a target harmonic phase angle.

[0105] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0106] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0107] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0108] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0109] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0110] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0111] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for calculating harmonic phase angle, characterized in that: include: Based on a predetermined sampling period, discrete sampling processing is performed on the voltage signal to obtain a plurality of sampling signals; Determine a single cycle of the voltage signal based on the multiple sampling signals, and calculate the zero point time of the fundamental wave rising edge of the voltage signal according to the single cycle of the voltage signal; The voltage signal is multiplied and accumulated according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, wherein the unit sine and cosine function is a unit sine and cosine function of the harmonic frequency of the voltage signal constructed by taking the zero point as the delay time; Performing vector superposition processing on the multiple initial harmonic phase angles to obtain a target harmonic phase angle; The voltage signal is multiplied and accumulated according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, including: calculating the product of the voltage signal corresponding to each of the sampling signals in the unit sine and cosine function; accumulating the product of the voltage signal in the unit sine and cosine function to obtain a sine DC component and a cosine DC component; and calculating the initial harmonic phase angle according to the sine DC component and the cosine DC component.

2. The method according to claim 1, characterized in that The determining of a single cycle of the voltage signal based on the multiple sampling signals comprises: Selecting a first target sampling signal from the plurality of sampling signals based on a preset rule, wherein the preset rule is that the voltage signal of the selected target sampling signal is greater than or equal to 0, and the voltage signal of the previous adjacent sampling signal of the target sampling signal is less than 0; Using the first target sampling signal as a starting sampling signal; Selecting a second target sampling signal from the plurality of sampling signals, which is after the first target sampling signal and satisfies the preset rule; using the second target sampling signal as a cutoff sampling signal; The voltage signal single cycle is determined based on the start sampling signal and the stop sampling signal.

3. The method according to claim 2, characterized in that The zero time of the fundamental wave rising edge of the voltage signal is obtained by calculating the single cycle of the voltage signal, including: Performing discrete Fourier transform on the sampling signal within a single cycle of the voltage signal to obtain a fundamental initial phase of the voltage signal; Calculating the fundamental frequency based on the number of the sampling signals within a single cycle of the voltage signal; Based on the fundamental frequency and the fundamental initial phase, constructing a unit fundamental sine function of the voltage signal; The zero point moment when the function value of the fundamental wave sine function is zero is calculated.

4. The method according to claim 1, characterized in that: The unit sine and cosine functions of the voltage signal harmonic frequency constructed by taking the zero point as the delay time include: Time delay processing is performed according to the delay time to construct a unit sine and cosine function of a harmonic frequency of a preset number, wherein the preset number is greater than one.

5. The method according to claim 1, characterized in that: Performing vector superposition processing on the multiple initial harmonic phase angles to obtain a target harmonic phase angle includes: Selecting a preset number of consecutive non-overlapping initial harmonic phase angles to construct a calculation unit; The initial harmonic phase angle in the calculation unit is subjected to vector superposition processing to obtain the target harmonic phase angle.

6. A harmonic phase angle calculation device, characterized in that: include: A sampling module, used for performing discrete sampling processing on the voltage signal based on a predetermined sampling period to obtain a plurality of sampling signals; A processing module, used for determining a single cycle of the voltage signal based on the multiple sampling signals, and calculating a zero point time of a fundamental wave rising edge of the voltage signal according to the single cycle of the voltage signal; a calculation module, configured to perform product and accumulation calculation processing on the voltage signal according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, wherein the unit sine and cosine function is a unit sine and cosine function of the harmonic frequency of the voltage signal constructed by taking the zero point as a delay time; A superposition module for performing vector superposition processing on the multiple initial harmonic phase angles to obtain a target harmonic phase angle; The voltage signal is multiplied and accumulated according to a unit sine and cosine function to obtain an initial harmonic phase angle of the voltage signal, including: calculating the product of the voltage signal corresponding to each of the sampling signals in the unit sine and cosine function; accumulating the product of the voltage signal in the unit sine and cosine function to obtain a sine DC component and a cosine DC component; and calculating the initial harmonic phase angle according to the sine DC component and the cosine DC component.

7. A non-volatile storage medium, characterized in that: The non-volatile storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor and executing the harmonic phase angle calculation method described in any one of claims 1 to 5.

8. A processor, characterized in that: The processor is used to run a program, wherein the program is configured to execute the harmonic phase angle calculation method according to any one of claims 1 to 5 when running.

9. An electronic device, comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the harmonic phase angle calculation method according to any one of claims 1 to 5.