Simple power grid phase extraction method for single-cycle calibration
By using the iterative algorithm of Fourier transform discretization processing and fundamental zero crossing point calibration in the phase extraction of the grid, the problems of complex grid phase extraction, large calculation amount and slow response speed in the prior art are solved, and efficient and real-time grid phase extraction is achieved.
Patent Information
- Application Number
- CN202411685504.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-23
- Publication Date
- 2025-02-28
AI Technical Summary
The existing power grid phase extraction methods are complex in multi-cycle data processing, large calculations, slow response speed, and their accuracy is affected when facing transient changes or nonlinear interference, making it difficult to meet the real-time requirements.
The iterative algorithm based on Fourier transform discretization processing is adopted to extract the fundamental components of the power grid through iterative operations, and the fundamental zero crossing point calibration is used during the discretization operation to reduce the calculation amount and accumulation error.
It realizes effective extraction of grid phases within a single cycle, improves real-time and accuracy, and is suitable for running on ARM/DSP and other processors, with small calculation volume and strong applicability.
Smart Images

Figure CN119535000A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of electric power technology, and in particular to a simple grid phase extraction method for single-cycle calibration. Background Art
[0002] Grid phase extraction is a key task in modern power systems and is widely used in power monitoring, protection, and control of electrical equipment. Some existing phase extraction methods usually use multi-cycle data for Fourier transform. This method is more complicated in the collection and processing of multi-cycle samples, has a large amount of calculation, and has a relatively slow response speed. In addition, the accuracy of multi-cycle methods will be significantly affected when facing transient changes or nonlinear interference. Therefore, these methods are not fully applicable to applications with high real-time requirements.
[0003] In view of the shortcomings of the existing power grid phase extraction method, a new single-cycle calibration method is urgently needed, which can effectively extract the power grid phase in a single cycle and improve real-time performance and accuracy. Based on this background, the present invention proposes a simple power grid phase extraction method with single-cycle calibration, aiming to solve the above-mentioned technical problems. Summary of the invention
[0004] 1. Technical issues to be solved
[0005] In view of the shortcomings of the prior art, the present invention proposes an iterative algorithm based on Fourier transform discretization processing, through which the fundamental component of the power grid can be extracted. The iterative operation greatly reduces the calculation amount of traditional Fourier operation; and in order to eliminate the accumulated error in the discretization operation process, the fundamental zero-crossing point is extracted for calibration. The algorithm has the advantages of small algorithm calculation amount, strong applicability, and is suitable for running on processors such as ARM / DSP.
[0006] (II) Technical solution
[0007] To achieve the above object, the present invention provides the following technical solution: a simple grid phase extraction method for single-cycle calibration, comprising the following steps:
[0008] S1: Fourier transform discretization, assuming that the detected power grid signal is: A n 、nw、 is the amplitude, angular frequency, and initial phase of the nth harmonic, w = 2πf, and f is the fundamental frequency;
[0009] S2: Iterative calculation. The calculated value of each newly added sampling point in the new cycle is synchronously subtracted from the calculated value of the same position in the previous cycle. Starting from the second cycle, it can be ensured that a1 and b1 always contain the latest N groups of calculated values.
[0010] S3: Zero-crossing point extraction;
[0011] S4: Phase calculation and calibration.
[0012] Preferably, in the step S1 in a discrete system, if the sampling frequency is fs, then the sampling period Ts=1 / fs, the number of sampling points in one fundamental period N=fs / f, and the above form is discretized, and u(t) at time t can be expressed as:
[0013]
[0014] in,
[0015] Preferably, when n=1, the fundamental wave component can be obtained as:
[0016] u(t)=a1cos(wt)+b1sin(wt)
[0017] in,
[0018] Preferably, the step S2 includes a first cycle (0<k≤N) and a second cycle (N<k≤2N);
[0019] (1) In the first cycle (0<k≤N), a1 and b1 are calculated according to the following formula;
[0020]
[0021] (2) In the second cycle (N<k≤2N), a1 and b1 are calculated according to the following formula;
[0022]
[0023] Preferably, in step S3, the k-th fundamental wave function can be obtained according to the result of iterative calculation as follows:
[0024]
[0025] Extract the zero-crossing point based on the zero-crossing characteristics of the sine and cosine functions:
[0026] ① When u(k-1)<0&&u(k)>=0 or u(k-1)<=0&&u(k)>0, it can be determined as the positive zero crossing point of the fundamental wave;
[0027] ② When u(k-1)>0&&u(k)<=0 or u(k-1)>=0&&u(k)<0, it can be determined as the negative zero crossing point of the fundamental wave;
[0028] The positive zero-crossing point is selected as the fundamental wave zero-crossing point, at which time the phase is 0, that is, GridPhase=0.
[0029] Preferably, in step S4, the sampling frequency is fs, the sampling period Ts=1 / fs, the sampled power grid frequency is f0, the sampling point N in each power grid period is fs / f0, and the power grid angle increment in each sampling period is:
[0030] Preferably, the process of phase calibration within a single grid cycle is: assigning the real-time phase GridPhase to 0 from the moment the grid signal crosses zero, and then increasing GridPhase by DeltaP in each sampling cycle until GridPhase is reassigned to 0 at the next zero crossing.
[0031] (III) Beneficial effects
[0032] Compared with the prior art, the present invention provides a simple grid phase extraction method with single-cycle calibration, which has the following beneficial effects: the present invention proposes an iterative algorithm based on Fourier transform discretization processing, through which the fundamental component of the grid can be extracted, and the iterative operation greatly reduces the calculation amount of traditional Fourier operation; and in order to eliminate the accumulated error in the discretization operation process, the fundamental zero-crossing point is extracted for calibration, which has the advantages of small algorithm calculation amount, strong applicability, and is suitable for running on processors such as ARM / DSP. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] Figure 1 This is a flow chart of the grid phase extraction method of the present invention;
[0034] Figure 2 It is a schematic diagram of the flow chart of the iterative algorithm of the present invention;
[0035] Figure 3 This is the phase extraction diagram of normal power grid signal;
[0036] Figure 4 This is a phase extraction diagram of the harmonic power grid signal injected into the present invention. DETAILED DESCRIPTION
[0037] In order to better understand the purpose, structure and function of the present invention, in order to achieve efficient operation and reduce error accumulation, the present invention proposes an iterative algorithm based on Fourier transform discretization processing, through which the fundamental component of the power grid can be extracted, and the use of iterative operations greatly reduces the amount of calculation of traditional Fourier operations; and in order to eliminate the accumulated errors in the discretization operation process, the fundamental zero-crossing point is extracted for calibration, which has the advantages of small algorithm calculation amount, strong applicability, and suitable for running on processors such as ARM / DSP. A simple power grid phase extraction method with single-cycle calibration of the present invention is further described in detail.
[0038] refer to Figure 1, the present invention: a simple grid phase extraction method for single-cycle calibration, in the case of injecting 3rd and 5th harmonics at 0.05s, comprises the following steps:
[0039] S1: Fourier transform discretization, assuming that the detected power grid signal is: A n 、nw、 is the amplitude, angular frequency, and initial phase of the nth harmonic, w = 2πf, and f is the fundamental frequency;
[0040] Specifically, in a discrete system, if the sampling frequency is fs, then the sampling period Ts = 1 / fs, and the number of sampling points in a fundamental wave period N = fs / f. Discretizing the above form, u(t) at time t can be expressed as:
[0041]
[0042] in,
[0043] Furthermore, when n=1, the fundamental wave component can be obtained as:
[0044] u(t)=a1cos(wt)+b1sin(wt)
[0045] in,
[0046] S2: Iterative calculation. The calculated value of each newly added sampling point in the new cycle is synchronously subtracted from the calculated value of the same position in the previous cycle. Starting from the second cycle, it can be ensured that a1 and b1 always contain the latest N groups of calculated values.
[0047] Specifically, Figure 2 As shown, it includes the first cycle (0<k≤N) and the second cycle (N<k
[0048] ≤2N);
[0049] (1) In the first cycle (0<k≤N), a1 and b1 are calculated according to the following formula;
[0050]
[0051] (2) In the second cycle (N<k≤2N), a1 and b1 are calculated according to the following formula;
[0052]
[0053] In the above formula, cosine cos and sine sin are functions with a period of 2π, and each period is discretized into N points. The sampled signal u(k) is also a periodic signal, and N points are sampled in each period. Therefore, the above formula can be understood as the calculated value of each newly added sampling point in the new period is synchronously subtracted from the calculated value at the same position in the previous period, which is similar to the traditional moving window calculation. Starting from the second period, it can be guaranteed that a1 and b1 always contain the latest N groups of calculated values. It is suitable for execution in chip interrupt functions such as DSP / ARM, and can respond to changes in the sampled signal more quickly. Compared with traditional discrete Fourier calculation, this method can update the fundamental function in each signal sampling period, with higher efficiency and smaller calculation amount.
[0054] S3: Figure 3 and Figure 4 As shown, zero-crossing point extraction;
[0055] Specifically, according to the result of iterative calculation, the k-th fundamental wave function can be obtained as follows:
[0056]
[0057] Extract the zero-crossing point based on the zero-crossing characteristics of the sine and cosine functions:
[0058] ① When u(k-1)<0&&u(k)>=0 or u(k-1)<=0&&u(k)>0, it can be determined as the positive zero crossing point of the fundamental wave;
[0059] ② When u(k-1)>0&&u(k)<=0 or u(k-1)>=0&&u(k)<0, it can be determined as the negative zero crossing point of the fundamental wave;
[0060] The positive zero-crossing point is selected as the fundamental wave zero-crossing point, at which time the phase is 0, that is, GridPhase=0.
[0061] S4: phase calculation and calibration;
[0062] Specifically, if the sampling frequency is fs, then the sampling period Ts = 1 / fs, and the sampled grid frequency is f0, then the sampling point N in each grid period is fs / f0, and the grid angle increment in each sampling period is:
[0063]
[0064] The process of phase calibration within a single grid cycle is as follows: from the moment the grid signal crosses zero, the real-time phase GridPhase is assigned to 0, and then GridPhase is increased by DeltaP in each sampling cycle until the next zero-crossing moment, when GridPhase is assigned to 0 again.
[0065] It is to be understood that the present invention is described by some embodiments, and it is known to those skilled in the art that various changes or equivalent substitutions may be made to these features and embodiments without departing from the spirit and scope of the present invention. In addition, under the teachings of the present invention, these features and embodiments may be modified to adapt to specific circumstances and materials without departing from the spirit and scope of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the scope of protection of the present invention.
Claims
1. A simple grid phase extraction method with single-cycle calibration, characterized in that: The following steps are involved: S1: Fourier transform discretization, assuming that the detected power grid signal is: A n 、nw、 is the amplitude, angular frequency, and initial phase of the nth harmonic, w = 2πf, and f is the fundamental frequency; S2: Iterative calculation. The calculated value of each newly added sampling point in the new cycle is synchronously subtracted from the calculated value of the same position in the previous cycle. Starting from the second cycle, it can be ensured that a1 and b1 always contain the latest N groups of calculated values. S3: zero-crossing point extraction; S4: Phase calculation and calibration.
2. A simple grid phase extraction method for single-cycle calibration according to claim 1, characterized in that: In the discrete system, if the sampling frequency of step S1 is fs, then the sampling period Ts=1 / fs, and the number of sampling points in one fundamental wave period N=fs / f. After discretization of the above form, u(t) at time t can be expressed as: in, 3. The simple grid phase extraction method of single-cycle calibration according to claim 2 is characterized in that: When n=1, the fundamental wave component can be obtained as: u(t)=a1cos(wt)+b1sin(wt) in, 4. The simple grid phase extraction method of single-cycle calibration according to claim 1 is characterized in that: The step S2 includes a first cycle (0<k≤N) and a second cycle (N<k≤2N); (1) In the first cycle (0<k≤N), a1 and b1 are calculated according to the following formula; (2) In the second cycle (N<k≤2N), a1 and b1 are calculated according to the following formula; 5. The simple grid phase extraction method of single-cycle calibration according to claim 1 is characterized in that: In step S3, the k-th fundamental wave function can be obtained according to the result of iterative calculation as follows: Extract the zero-crossing point based on the zero-crossing characteristics of the sine and cosine functions: ① When u(k-1)<0&&u(k)>=0 or u(k-1)<=0&&u(k)>0, it can be determined as the positive zero crossing point of the fundamental wave; ② When u(k-1)>0&&u(k)<=0 or u(k-1)>=0&&u(k)<0, it can be determined as the negative zero crossing point of the fundamental wave; The positive zero-crossing point is selected as the fundamental wave zero-crossing point, at which time the phase is 0, that is, GridPhase=0.
6. The simple grid phase extraction method of single-cycle calibration according to claim 5 is characterized in that: In step S4, the sampling frequency is fs, the sampling period Ts=1 / fs, the sampled grid frequency is f0, the sampling point N in each grid period is fs / f0, and the grid angle increment in each sampling period is:
7. A simple grid phase extraction method for single-cycle calibration according to claim 6, characterized in that: The process of phase calibration within a single grid cycle is as follows: from the moment the grid signal crosses zero, the real-time phase GridPhase is assigned a value of 0, and thereafter GridPhase is increased by DeltaP in each sampling cycle until GridPhase is reassigned to 0 at the next zero-crossing moment.