Power grid frequency detection method, system, equipment and medium
Through the combination of the zero space tracking algorithm and discrete Fourier transform, the difficulty of separating the interference frequencies when they are close in the grid frequency estimation is solved, and high-precision frequency detection is achieved in a complex grid environment.
Patent Information
- Application Number
- CN202510672284.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-23
- Publication Date
- 2025-09-05
AI Technical Summary
In the prior art, when estimating the grid frequency, when the interference frequency is close to the fundamental frequency, it is difficult to effectively separate the fundamental and interference components, resulting in a large frequency estimation error.
The zero space tracking algorithm is used to decompose the grid input voltage signal into narrowband signals, extract the fundamental main modal component, perform discrete Fourier transform after low-pass processing, and calculate the phase information to obtain the grid frequency estimation.
When the interference frequencies are close, it can maintain high separation accuracy and improve the accuracy of grid frequency estimation.
Smart Images

Figure CN120594939A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power systems, and in particular to a method, system, equipment and medium for detecting power grid frequency. Background Art
[0002] Grid frequency is a key parameter reflecting the operating status of the power system. Ideally, the frequency of the power system should remain stable (usually 50Hz). However, in actual operation, due to various factors, the grid frequency may fluctuate, resulting in a decline in power quality. Real-time monitoring and estimation of grid frequency can promptly identify power quality issues. At the same time, real-time monitoring of grid frequency also helps to understand the load changes and supply and demand relationships of the power system, providing guidance for the optimal allocation and scheduling of energy, and providing an important basis for the optimized scheduling and operation and maintenance management of the power system, thereby ensuring a stable supply and high-quality output of electricity, reducing energy loss, improving energy utilization efficiency, and achieving the goals of energy conservation and emission reduction.
[0003] In order to achieve accurate estimation of grid frequency, academia and industry have made a lot of efforts in this regard. Currently, there are two main directions: one is the frequency domain-based method, which mainly performs discrete Fourier transform on the voltage within a time window, calculates the relationship between the phase difference and the frequency correction value under asynchronous sampling according to the offset of the fundamental frequency, and then estimates the grid frequency from the phase difference; the other is the time domain-based method, which mainly achieves filtering of interference waveforms and estimation of fundamental frequency through zero-crossing detection of the voltage waveform, adaptive matching filtering or Kalman filtering. Overall, both of the above two types of solutions have limitations, which are mainly reflected in the fact that when the interference noise is non-stationary and the interference frequency is close to the fundamental frequency, the algorithm accuracy is poor and the grid frequency estimation effect is inaccurate. The following takes the time domain-based method as an example to describe the problems existing in the specific implementation process:
[0004] The zero-crossing detection method determines the length of the current fundamental wave period by calculating the three zero-crossing points of the voltage waveform in a complete cycle. When the voltage signal is disturbed, the actual zero-crossing point will swing around the original zero-crossing point. Therefore, the grid frequency value measured by this method has inherent defects in principle and needs to be corrected. There are two commonly used correction methods: First, through pre-processing, the measurement signal is low-pass or band-pass filtered to filter out interference as much as possible before calculating the zero-crossing point; second, through post-processing, the estimated fundamental wave period is smoothed within a window of adaptive length to eliminate zero-crossing detection fluctuations caused by disturbances. Due to the real-time requirements of the grid frequency, the window length is generally limited to 30 cycles. Therefore, the smoothing effect is poor when dealing with fluctuations caused by low-frequency interharmonic disturbances. Although these pre-processing and post-processing measures can partially improve the estimation accuracy of the grid frequency, when the interference frequency is close to the fundamental frequency, the performance improvement of the algorithm is limited.
[0005] The adaptive notch filter method uses the filtered output of the observed voltage signal as the cost function, establishes the relationship between the notch frequency point parameters and the square value of the filter output, and dynamically minimizes the filter output in an adaptive iterative tracking manner, thereby realizing the estimation of the grid frequency parameters. The disadvantages of this method are: First, the system optimization equation is solved in an iterative manner. In order to achieve better solution accuracy and solution speed, the notch filter parameters and learning step size and other parameters need to be manually adjusted and set, which affects the applicability to a certain extent; Second, the notch filter used in practice is non-ideal, and there is a transition band near the notch point frequency. Therefore, when the interference frequency is close to the fundamental frequency, the algorithm performance degrades seriously; Third, notch filters with high quality factors often correspond to higher filter orders, resulting in the corresponding optimization equation iterative form being more complex and nonlinear, difficult to solve, and prone to convergence to a local suboptimal solution, which is greatly affected by the initial parameters;
[0006] The Kalman filter algorithm estimates the discrete sampling sequence under the minimum mean square error condition to obtain the estimated value of the state variable at the previous moment, uses the current sampling point to calculate the updated state variable, and then uses the updated state variable to inversely solve the estimated value of the current sampling point. This method is suitable for processing the situation where the state variables in the system evolve linearly over time. For the frequency estimation problem, when there are both harmonic and interharmonic interference, it is difficult to establish the prediction equation of state evolution and the observation equation between the observed value and the state variable in a linear manner for the fundamental frequency as the state quantity to be determined. Although there are methods in the prior art that propose to use discrete extension or traceless Kalman filter algorithms to attempt to estimate the power grid frequency problem, due to the local linear approximation and oversimplification of the noise model, its estimation is generally biased, and does not reflect the advantages of estimation accuracy and calculation speed compared to other traditional instantaneous frequency estimation methods, and the algorithm complexity is high. In addition, if a two-stage adaptive discrete expansion or unscented Kalman filter algorithm is used, although the anti-interference ability and accuracy are improved, the computational complexity is often too large, and the algorithm also has simplified restrictions on the interference model, such as requiring that it cannot contain interharmonic components (the frequency of interharmonics is usually close to the fundamental frequency). Therefore, when the interference frequency is close to the fundamental frequency, the algorithm cannot be effectively processed, the performance will be significantly reduced, the algorithm converges slowly, the dynamic tracking ability is weak, and the applicability is not strong.
[0007] In summary, when estimating the grid frequency in the prior art, if the interference frequency is close to the fundamental frequency, the fundamental and interference components cannot be effectively separated, which will lead to a large error in the grid frequency estimation. Summary of the Invention
[0008] In order to solve the problem in the prior art of estimating the grid frequency that, when the interference frequency is close to the fundamental frequency, it is difficult to effectively separate the fundamental and interference components, resulting in a large error in the grid frequency estimation, the present invention proposes a grid frequency detection method, comprising:
[0009] Performing narrowband signal decomposition on the acquired input voltage signal of the power grid using a zero space tracking algorithm to obtain a fundamental main modal component of the input voltage signal;
[0010] Performing low-pass processing on the fundamental wave main modal component to obtain a fundamental wave signal of the fundamental wave main modal component;
[0011] Performing discrete Fourier transform on the fundamental wave signal to obtain phase information of the fundamental wave signal;
[0012] According to the phase information of the fundamental wave signal, the phase offset information of the fundamental wave signal in the pre-selected adjacent cycles is calculated to obtain the frequency estimation information of the power grid.
[0013] Optionally, performing narrowband signal decomposition on the acquired input voltage signal of the power grid using a zero space tracking algorithm to obtain a fundamental main modal component of the input voltage signal includes:
[0014] Initialize the regularization parameter, energy balance coefficient, residual estimation value and maximum number of iterations according to the obtained input voltage signal of the power grid;
[0015] Solving a pre-constructed optimization equation according to the input voltage signal, the initialized regularization parameter, the energy balance coefficient, the residual estimate, and the maximum number of iterations to obtain each modal component of the input voltage signal;
[0016] Based on the modal components and the acquired energy values of the modal components, a modal component with a maximum energy value is selected from all the modal components as the fundamental main modal component of the input voltage signal.
[0017] Optionally, solving a pre-constructed optimization equation according to the input voltage signal, the initialized regularization parameter, the energy balance coefficient, the residual estimate, and the maximum number of iterations to obtain each modal component of the input voltage signal includes:
[0018] Calculating a time-varying weight function value according to the input voltage signal, the initialized regularization parameter, the energy balance coefficient, and the residual estimate;
[0019] Updating the regularization parameter according to the time-varying weight function value;
[0020] Updating the residual estimate according to the updated regularization parameter;
[0021] updating the energy balance coefficient according to the updated residual estimate;
[0022] Solving the pre-constructed optimization equation according to the updated regularization parameter, the updated residual estimate, and the updated energy balance coefficient until the maximum number of iterations is reached, and outputting the residual component of the input voltage signal;
[0023] A difference operation is performed on the input voltage signal and a residual component of the input voltage signal to obtain each modal component of the input voltage signal.
[0024] Optionally, the optimization equation is expressed as follows:
[0025]
[0026] Where,
[0027]
[0028] Where U(t) represents the residual component at time t; α(t) represents the time-varying weight function value at time t; s(t) represents the input voltage signal at time t; λ1 represents the first regularization parameter; λ2 represents the second regularization parameter; γ represents the energy balance coefficient; D represents the preset second-order differential operator; V i (t) represents the modal component i at time t; i=1…K; K represents the total number of modal components.
[0029] Optionally, performing discrete Fourier transform on the fundamental wave signal to obtain phase information of the fundamental wave signal includes:
[0030] Performing a discrete Fourier transform on the fundamental wave signal to obtain a frequency domain coefficient of the fundamental wave signal;
[0031] Calculating a fundamental wave phasor of the fundamental wave signal according to the frequency domain coefficient, and using the fundamental wave phasor as phase information of the fundamental wave signal;
[0032] The frequency domain coefficients include: sine coefficients and cosine coefficients.
[0033] Optionally, calculating, based on the phase information of the fundamental wave signal, phase offset information of the fundamental wave signal in pre-selected adjacent cycles to obtain frequency estimation information of the power grid includes:
[0034] determining whether the power grid has a frequency offset according to the phase information of the fundamental wave signal;
[0035] When the power grid has a frequency offset, calculating the phase offset information of the fundamental wave signal in pre-selected adjacent cycles, and correcting the phase information of the fundamental wave signal by discrete Fourier transform according to the phase offset information to obtain the frequency offset information of the fundamental wave signal;
[0036] The frequency of the power grid is detected according to the frequency offset information of the power grid to obtain frequency estimation information of the power grid.
[0037] Optionally, performing frequency detection on the power grid according to the frequency offset information of the power grid to obtain frequency estimation information of the power grid includes:
[0038] estimating the angular frequency of the power grid according to the frequency offset information of the power grid to obtain angular frequency estimation information of the power grid;
[0039] Adaptive window smoothing is used to perform frequency correction on the angular frequency estimation information to obtain frequency estimation information of the power grid.
[0040] Based on the same inventive concept, the present invention also provides a power grid frequency detection system, comprising:
[0041] a narrowband decomposition module, configured to perform narrowband signal decomposition on the acquired input voltage signal of the power grid using a null space tracking algorithm to obtain a fundamental main modal component of the input voltage signal;
[0042] A low-pass processing module, configured to perform low-pass processing on the fundamental main modal component to obtain a fundamental signal of the fundamental main modal component;
[0043] A Fourier transform module, configured to perform discrete Fourier transform on the fundamental wave signal to obtain phase information of the fundamental wave signal;
[0044] The frequency detection module is used to calculate the phase offset information of the fundamental wave signal in the pre-selected adjacent cycles according to the phase information of the fundamental wave signal to obtain the frequency estimation information of the power grid.
[0045] Optionally, the narrowband decomposition module includes:
[0046] A parameter initialization submodule is used to initialize the regularization parameter, energy balance coefficient, residual estimation value and maximum number of iterations according to the acquired input voltage signal of the power grid;
[0047] an equation solving submodule, configured to solve a pre-constructed optimization equation according to the input voltage signal, an initialized regularization parameter, an energy balance coefficient, a residual estimate, and a maximum number of iterations, to obtain modal components of the input voltage signal;
[0048] The main mode selection submodule is used to select the modal component with the largest energy value from all the modal components as the fundamental main modal component of the input voltage signal based on the modal components and the energy values of the modal components obtained.
[0049] Optionally, the equation solving submodule includes:
[0050] A time-varying weight calculation unit, configured to calculate a time-varying weight function value based on the input voltage signal, the initialized regularization parameter, the energy balance coefficient, and the residual estimate;
[0051] A regularization updating unit, configured to update the regularization parameter according to the time-varying weight function value;
[0052] A residual updating unit, configured to update the residual estimation value according to the updated regularization parameter;
[0053] a balance coefficient updating unit, configured to update the energy balance coefficient according to the updated residual estimation value;
[0054] a component solving unit, configured to solve a pre-constructed optimization equation according to the updated regularization parameter, the updated residual estimate, and the updated energy balance coefficient until the maximum number of iterations is reached, and output a residual component of the input voltage signal;
[0055] The component output unit is used to perform a difference operation on the input voltage signal and the residual component of the input voltage signal to obtain each modal component of the input voltage signal.
[0056] Optionally, the optimization equation is expressed as follows:
[0057]
[0058] Where,
[0059]
[0060] Where U(t) represents the residual component at time t; α(t) represents the time-varying weight function value at time t; s(t) represents the input voltage signal at time t; λ1 represents the first regularization parameter; λ2 represents the second regularization parameter; γ represents the energy balance coefficient; D represents the preset second-order differential operator; V i (t) represents the modal component i at time t; i=1…K; K represents the total number of modal components.
[0061] Optionally, the Fourier transform module includes:
[0062] A coefficient calculation submodule, configured to perform discrete Fourier transform on the fundamental wave signal to obtain frequency domain coefficients of the fundamental wave signal;
[0063] a phase calculation submodule, configured to calculate a fundamental phasor of the fundamental signal according to the frequency domain coefficient, and use the fundamental phasor as phase information of the fundamental signal;
[0064] The frequency domain coefficients include: sine coefficients and cosine coefficients.
[0065] Optionally, the frequency detection module includes:
[0066] an offset judgment submodule, configured to judge whether the power grid has a frequency offset based on the phase information of the fundamental wave signal;
[0067] a phase correction submodule, configured to calculate, when there is a frequency offset in the power grid, the phase offset information of the fundamental wave signal in pre-selected adjacent cycles, and to correct the phase information of the fundamental wave signal by discrete Fourier transform according to the phase offset information to obtain the frequency offset information of the fundamental wave signal;
[0068] The frequency estimation submodule is configured to perform frequency detection on the power grid according to the frequency offset information of the power grid to obtain frequency estimation information of the power grid.
[0069] Optionally, the frequency estimation submodule includes:
[0070] an angular frequency estimation unit, configured to estimate the angular frequency of the power grid according to the frequency offset information of the power grid to obtain angular frequency estimation information of the power grid;
[0071] A frequency correction unit is used to perform frequency correction on the angular frequency estimation information by using an adaptive window smoothing to obtain frequency estimation information of the power grid.
[0072] In another aspect, the present invention further provides an electronic device, comprising: at least one processor and a memory; the memory and the processor are connected via a bus;
[0073] The memory is used to store one or more programs;
[0074] When the one or more programs are executed by the at least one processor, a power grid frequency detection method as described above is implemented.
[0075] On the other hand, the present invention further provides a computer-readable storage medium having an execution program stored thereon. When the execution program is executed, the power grid frequency detection method as described above is implemented.
[0076] Compared with the prior art, the present invention has the following beneficial effects:
[0077] The present invention provides a power grid frequency detection method, system, device and medium, including: using a zero space tracking algorithm to perform narrowband signal decomposition on an acquired power grid input voltage signal to obtain a fundamental main modal component of the input voltage signal; performing low-pass processing on the fundamental main modal component to obtain a fundamental signal of the fundamental main modal component; performing discrete Fourier transform on the fundamental signal to obtain phase information of the fundamental signal; and calculating, based on the phase information of the fundamental signal, phase offset information of the fundamental signal in pre-selected adjacent cycles to obtain frequency estimation information of the power grid; the present invention performs narrowband decomposition on the input voltage signal through a zero space tracking algorithm to accurately extract the fundamental main mode; and performing discrete Fourier transform based on the fundamental main mode to determine the phase offset information, so that when the interference frequency of the power grid is close to the fundamental frequency, high separation accuracy can be maintained, which is beneficial to improving the accuracy of power grid frequency estimation. BRIEF DESCRIPTION OF THE DRAWINGS
[0078] Figure 1 A schematic flow chart of a method for detecting power grid frequency provided by the present invention;
[0079] Figure 2 A schematic diagram of the amplitude-frequency response characteristics of a filter in a power grid frequency detection method provided by the present invention;
[0080] Figure 3 A schematic diagram of the overall technical solution of a power grid frequency detection method provided by the present invention;
[0081] Figure 4 A waveform diagram of an input voltage signal in a power grid frequency detection method provided by a specific embodiment of the present invention;
[0082] Figure 5 A schematic diagram of a voltage waveform amplitude spectrum in a power grid frequency detection method provided by a specific embodiment of the present invention;
[0083] Figure 6 A schematic diagram of a voltage instantaneous frequency-time curve in a power grid frequency detection method provided by a specific embodiment of the present invention;
[0084] Figure 7 A schematic diagram of the structure of a power grid frequency detection system provided by the present invention;
[0085] Figure 8 This is a structural diagram of an electronic device provided by the present invention. DETAILED DESCRIPTION
[0086] The present invention provides a method, system, device and medium for detecting power grid frequency. The specific embodiments of the present invention are further described in detail below with reference to the accompanying drawings.
[0087] Example 1:
[0088] The present invention provides a method for detecting power grid frequency, the flow chart of which is as follows: Figure 1 Shown, including:
[0089] Step 1: Use the Null Space Pursuit (NSP) algorithm to perform narrowband signal decomposition on the acquired grid input voltage signal to obtain the fundamental main modal component of the input voltage signal;
[0090] Step 2: Perform low-pass processing on the fundamental main modal component to obtain the fundamental signal of the fundamental main modal component;
[0091] Step 3: Perform discrete Fourier transform on the fundamental signal to obtain the phase information of the fundamental signal;
[0092] Step 4: Based on the phase information of the fundamental wave signal, calculate the phase offset information of the fundamental wave signal in the pre-selected adjacent cycles to obtain the frequency estimation information of the power grid.
[0093] In general, existing power grid frequency detection technologies can be divided into two main categories: time-domain-based zero-crossing detection, adaptive filtering, and Kalman filtering methods, and frequency-domain-based discrete Fourier transform (DFT) methods. Although these methods can complete frequency estimation tasks under certain conditions, they suffer from a significant decrease in accuracy when faced with non-stationary disturbance signals, especially when the interference frequency is close to the fundamental frequency. For example, in the time-domain method, the zero-crossing detection method is sensitive to disturbances, and the filter method has problems such as difficulty in parameter adjustment and incomplete notching. While the frequency-domain method has clear theoretical basis, its reliance on full-cycle sampling can easily lead to estimation errors under frequency fluctuation conditions, especially when the DFT produces a phase leakage effect in a non-full-cycle window, which in turn affects the accuracy of frequency estimation. Therefore, how to effectively distinguish the fundamental and interference components when the frequencies are close or aliased has become a core problem that needs to be solved in the field of power grid frequency detection. To solve the above problems, the present invention considers null space tracking as the core, and realizes fine extraction of frequency components and strong interference suppression in the time domain through adaptive narrowband decomposition of the input voltage signal (especially suitable for complex scenarios where the fundamental and interharmonic frequencies are close). Combined with the subsequent DFT phase correction and adjacent cycle phase difference extraction strategy, it can not only make up for the limitations of the frequency domain method under non-integer cycle sampling, but also effectively improve the dynamic accuracy of frequency estimation, constructing a highly robust frequency detection framework of "time domain purification + frequency domain correction", which provides a new path for solving the interference sensitivity problem in power grid frequency estimation. Specifically:
[0094] In one implementation, the process of performing narrowband signal decomposition on the acquired input voltage signal of the power grid using the null space tracking algorithm in step 1 to obtain the fundamental main modal component of the input voltage signal may include:
[0095] Initialize the regularization parameter, energy balance coefficient, residual estimation value and maximum number of iterations according to the obtained input voltage signal of the power grid;
[0096] According to the input voltage signal, the initialized regularization parameter, the energy balance coefficient, the residual estimate and the maximum number of iterations, the pre-constructed optimization equation is solved to obtain the modal components of the input voltage signal;
[0097] Based on each modal component and the energy value of each modal component obtained, a modal component with the largest energy value is selected from all modal components as the fundamental main modal component of the input voltage signal;
[0098] Specifically, in the above implementation, the process of solving the pre-constructed optimization equation according to the input voltage signal, the initialized regularization parameter, the energy balance coefficient, the residual estimate, and the maximum number of iterations to obtain each modal component of the input voltage signal may include:
[0099] Calculate the time-varying weight function value based on the input voltage signal, the initialized regularization parameter, the energy balance coefficient and the residual estimate;
[0100] Update the regularization parameter according to the time-varying weight function value;
[0101] Update the residual estimate according to the updated regularization parameter;
[0102] Update the energy balance coefficient based on the updated residual estimate;
[0103] Solve the pre-constructed optimization equation according to the updated regularization parameter, the updated residual estimate, and the updated energy balance coefficient until the maximum number of iterations is reached, and output the residual component of the input voltage signal;
[0104] Performing a difference operation on the input voltage signal and the residual component of the input voltage signal to obtain each modal component of the input voltage signal;
[0105] By performing narrowband signal decomposition on the input voltage signal using the above implementation method, basic modal components and residual components can be obtained:
[0106]
[0107] Where s(t) represents the input voltage signal at time t; U(t) represents the residual component at time t (including undecomposed noise or low-frequency interference); V i (t) represents the modal component i at time t; i=1…K; K represents the total number of modal components.
[0108] In this implementation, by setting regularization parameters, energy balance coefficients, and residual estimates during the initialization phase, a comprehensive parameter coordination mechanism is established to optimize the decomposition process. This ensures that each iteration not only strikes a balance between fidelity and smoothness but also dynamically adjusts the energy distribution between modes, minimizing the intrusion of interfering signals such as harmonics and interharmonics. Compared to traditional decomposition methods based on preset bandpass filtering or fixed window functions, null space tracking performs modal extraction without a priori templates, enabling more flexible adaptation to the variable frequency perturbations in actual power grids. This allows for high-fidelity extraction of the fundamental component and provides stable input for subsequent frequency estimation. Furthermore, in existing techniques, modal extraction results are highly susceptible to sampling disturbances, frequency drift, or sudden harmonics, and the component with the highest energy may not necessarily correspond to the true fundamental. However, by constructing a time-varying weighting function and introducing a residual control mechanism, the extracted modal components not only exhibit excellent narrowband characteristics but also structurally suppress harmonic components, thereby improving modal stability from the source.
[0109] For example, the narrowband signal decomposition of the input voltage signal using the NSP algorithm can be used to obtain the residual components and modal components, which can be solved by the following optimization equations:
[0110]
[0111] Wherein, U(t) represents the residual component at time t; α(t) represents the time-varying weight function value at time t (used to balance the contribution of the differential term and the residual term); s(t) represents the input voltage signal at time t; λ1 represents the first regularization parameter (which can be used to control the fidelity, for example); λ2 represents the second regularization parameter (which can be used to represent the smoothness of the weight function, for example); γ represents the energy balance coefficient (which can be used to adjust the energy distribution between the modal component and the residual); D represents the preset second-order differential operator;
[0112] In detail, the optimization equation can be solved by the following iterative algorithm:
[0113] (1) Initialization:
[0114] Input voltage signal s(t), initial regularization parameter λ1=1e -6 ,λ2=1e -4 , initial energy balance coefficient γ=1, initial maximum number of iterations: ε=1e -7 , Main iterative loop: Let the iteration index j = 0, let the residual estimate U of the jth iteration j =0, let the first regularization parameter λ1 of the jth iteration j =λ1, let the energy balance coefficient γ of the jth iteration j =γ;
[0115] (2) Calculate the time-varying weight function value α of the jth iteration at time t j (t):
[0116]
[0117] Where S represents the vector form of the input voltage signal s(t); U j represents the residual estimate of the jth iteration; λ2 represents the second regularization parameter; T represents the transpose; D represents the second-order differential operator; the calculation formula is obtained by the signal residual SU j The ratio of the second-order differential energy to the residual energy itself can dynamically adjust the weight of the differential term;
[0118] (3) Update the first regularization parameter of the j+1th iteration
[0119]
[0120] Among them, S TRepresents the transpose of the vector form S of the input voltage signal s(t); Denotes the derivative Q at the jth iteration j Corresponding to the first regularization parameter and the energy balance coefficient γ j is the regularized matrix; T represents transpose; Indicated The transpose of
[0121] In the above formula,
[0122]
[0123] Q j =D+diag(α j );
[0124] Among them, Q j Indicates the combination of the second-order differential operator D and the time-varying weight function α at the jth iteration j derivatives of logarithms; Indicates Q j The transpose of ; diag() is a diagonal matrix;
[0125] (4) Update the residual component U of the j+1th iteration j+1 :
[0126]
[0127] Where S represents the vector form of the input voltage signal s(t); Denotes the derivative Q at the jth iteration j The transpose of represents the first regularization parameter of the j-th iteration; represents the first regularization parameter of the j+1th iteration; γ j represents the energy balance coefficient at the jth iteration;
[0128] (5) Update the energy balance coefficient γ of the j+1th iteration j+1 :
[0129]
[0130] When||U j+1 -U j When ||<ε (ε represents the maximum number of iterations), let j←j+1 and jump to recalculate the time-varying weight function value of the jth iteration at time t, otherwise exit the loop;
[0131] Output: Let the first regular parameter Let the energy balance coefficient γ = γ j+1 ;
[0132] The modal component V = (SU)(1 + γ), then the residual component can be expressed as: U = SV, where V is the set of all modal components; S represents the vector form of the input voltage signal s(t); U is the set of residual components;
[0133] The above process can be repeated for V, thereby further decomposing it into a series of basic modal components. Preferably, the number of iterations of this process is 3 to 5, which is more appropriate, and 5 can be selected.
[0134] For the basic modal components obtained by decomposition, the one with the largest energy is selected (for example, the energy value at time t can be expressed as V b (t)) is the main modal component corresponding to the fundamental wave;
[0135] In solving the aforementioned optimization equations, a zero-space tracking optimization model with regularization control and energy balance mechanisms is constructed to perform layer-by-layer modal decomposition of the power grid voltage signal. A dynamically adjusted time-varying weight function guides the extraction path of the signal's nonlinear components, achieving high-precision separation of narrowband modes within the signal. This process utilizes an embedded multi-parameter adaptive update process, where the regularization parameter controls the smoothness of the modal, the energy balance coefficient regulates the energy distribution between the modal and residual, and the iterative form consisting of the residual estimate and the differential operator enables the algorithm to quickly focus on the dominant mode. The technical advantage of this mechanism lies in that it does not simply perform frequency filtering or linear transformation on the voltage signal, but rather adaptively constructs a decomposition basis in the time domain that matches the signal characteristics, from which the physically meaningful fundamental dominant modal components are extracted. This approach significantly enhances signal separation capabilities in scenarios with similar frequency interference, while avoiding the difficulties encountered in conventional transformation methods in window function design or filter parameter selection. This provides a cleaner and more stable base signal for the subsequent frequency estimation process, improving the usability and accuracy of frequency detection in the presence of low signal-to-noise ratios and complex power disturbances. Although the concept of "modal decomposition" has been widely used in the field of signal processing, the method adopted in the present invention essentially integrates multiple nonlinear processing elements and a coupled parameter feedback mechanism, and uses a strategy of guiding the adjustment of the regularization term with time-varying weights to form a dynamic equilibrium relationship between the residual term and the differential term, and has significant structural adaptability; at the same time, the energy balance coefficient is updated in real time in each round of iteration, and its objective function not only considers the energy competition between modes, but also automatically guides the decomposition process to converge to the high-energy main mode. This "weight + regularization + residual" ternary feedback structure realizes a modal identification process with clear goals, good convergence and no dependence on the preset model structure through the mutual driving between parameters, which greatly improves the separation effect of the real fundamental wave in the high dynamic change scenario of the power grid. In addition, to further enhance the performance of the solution, it is also possible to consider adding a statistical analysis module for the frequency spectrum distribution between modes to assist in mode selection. For example, after completing the preliminary energy discrimination, the modal spectrum concentration or frequency offset rate criterion is introduced as a weighting factor, which is conducive to further accurately identifying the fundamental main modal component between modes with similar energy. This new feature can, on the one hand, alleviate the problem of modal misselection that may occur when judging only by modal energy in the context of multi-frequency interference. On the other hand, it can improve the entire system's ability to discriminate dynamic grid disturbance signals and enhance the continuity and stability of frequency estimation. It is especially suitable for power scenarios with frequent disturbances, such as energy storage stations and electric vehicle group access.
[0136] In order to remove the influence of harmonics contained in the fundamental main modal component on the detection results, the present invention performs the fundamental main modal component V b(t) low-pass processing is performed. Preferably, the low-pass filter used can be a Butterworth type, with a cut-off frequency of 75 Hz and an order of 5. The corresponding amplitude-frequency response characteristic curve is as follows: Figure 2 As shown (wherein the horizontal axis Frequency represents the frequency in Hertz / Hz; the vertical axis Magnitude represents the amplitude spectrum of the signal in decibels / dB); by adopting a Butterworth low-pass filter, the filter has a smooth amplitude-frequency response and a relatively steep roll-off characteristic, which can effectively filter out interference signals higher than the fundamental frequency, especially harmonic components. The cutoff frequency is set to 75Hz, which means that the fundamental signal near 50Hz can be retained, while effectively suppressing high-frequency components far away from the fundamental frequency, including but not limited to various harmonics, interharmonics and high-frequency noise caused by power equipment. When the order of the Butterworth filter is 5, it has a relatively flat gain characteristic within the passband of the filter, which means that it has little impact on the fidelity of the fundamental signal and can retain the amplitude and phase information of the fundamental signal to the greatest extent. In the stopband of the filter, it exhibits a steep attenuation characteristic, ensuring effective suppression of high-frequency interference signals. In this way, the fundamental main modal component can obtain a more accurate fundamental signal without being affected by high-frequency noise, thereby improving the accuracy of power grid frequency detection.
[0137] In the above implementation, by filtering the fundamental main modal component, the influence of high-frequency harmonics and other interference components can be effectively removed, thereby extracting a purer fundamental signal. In order to further analyze the frequency components in the signal, it is possible to consider analyzing the frequency domain characteristics of the fundamental signal through DFT to accurately reflect the phase information of the signal. Specifically:
[0138] In one implementation, the process of performing discrete Fourier transform on the fundamental wave signal in step 3 to obtain phase information of the fundamental wave signal may include:
[0139] Perform discrete Fourier transform on the fundamental signal to obtain the frequency domain coefficient of the fundamental signal;
[0140] Calculate the fundamental phasor of the fundamental signal according to the frequency domain coefficient, and use the fundamental phasor as the phase information of the fundamental signal;
[0141] The frequency domain coefficients may include: sine coefficients and cosine coefficients.
[0142] In this implementation, the process of performing Fourier transform on the fundamental wave signal to obtain the frequency domain coefficient of the fundamental wave signal may specifically include:
[0143] Record the fundamental signal at time t Where A represents the fundamental wave amplitude; Ω0 represents the rated fundamental wave angular frequency; represents the initial phase angle of the fundamental wave. For a complete cycle of the input voltage signal s(t) at time t, the N-point discrete Fourier transform can be used to calculate the Fourier series coefficients of s(t) (that is, the frequency domain coefficients, including the cosine coefficients and sine coefficients):
[0144]
[0145] Among them, c n Represents the cosine coefficient of the nth frequency component; d n represents the sinusoidal coefficient of the nth frequency component; s(k) is the sampling value of s(t) at time kT (also represents the signal value at the kth sampling point, k = 0, 1, ..., N-1), is the sampling interval (i.e., the total number of sampling points per cycle is N), and f0 is the rated frequency. In particular, when the frequency component n = 1, the frequency domain coefficients obtained are as follows:
[0146]
[0147] Wherein, c1 represents the cosine coefficient when n=1; d1 represents the sine coefficient when n=1;
[0148] The fundamental wave phasor calculation formula can be as follows:
[0149]
[0150] Wherein, j represents the current iteration number; N represents the total sampling points; e represents the exponential function; k represents the current sampling point;
[0151] In this implementation, the fundamental signal is subjected to a discrete Fourier transform (DFT) to convert the time-domain signal into frequency-domain information, thereby extracting the frequency-domain coefficients and phase information of the fundamental signal. The aforementioned method for calculating the frequency-domain coefficients, particularly describing the amplitude and phase of the fundamental signal through sine and cosine coefficients, can accurately extract relevant information about the fundamental frequency, especially its phase information, from complex voltage signals, thereby providing a reliable basis for accurate estimation of the grid frequency. This method ensures that even when there is a frequency offset or interference from external noise, the fundamental signal can still be extracted with high accuracy. Furthermore, by calculating the fundamental phasor, the phase change of the fundamental signal can be further obtained, which is crucial for subsequent frequency detection, especially under dynamically changing grid conditions, and can better track real-time changes in grid frequency. Although the Fourier transform in this implementation is a classic signal processing tool and has been widely adopted in many applications, it is optimized for the specific application of grid frequency detection. Traditional Fourier transforms are generally used to process static, stable signals. However, in power system applications, the grid frequency is often disturbed, and the fundamental signal may be mixed with harmonics or other interfering signals. Through refined frequency domain coefficient extraction and fundamental phasor calculation, the pure fundamental component can be more effectively extracted from the complex grid voltage signal, which helps to overcome the shortcomings of traditional Fourier transform in the context of dynamic interference. In particular, in the extraction of fundamental phase information, through precise calculation and combination with the grid frequency change model, high accuracy can be maintained in the presence of frequency offset. In addition, this implementation can also consider introducing an adaptive filtering algorithm to dynamically correct the deviation of phase information, making the frequency estimation process more accurate, especially under conditions of grid load fluctuations or transient disturbances.
[0152] After obtaining the fundamental wave phase information through the above implementation method, this phase information needs to be further processed to identify and correct possible frequency offsets. In this process, it is possible to consider calculating the phase offset between adjacent cycles to accurately determine whether the power grid has frequency offsets. This phase offset information can then be used to correct the phase of the fundamental wave signal through discrete Fourier transform. Specifically:
[0153] In one implementation, the process of calculating the phase offset information of the fundamental signal in pre-selected adjacent cycles based on the phase information of the fundamental signal in step 4 to obtain the frequency estimation information of the power grid may include:
[0154] According to the phase information of the fundamental wave signal, determine whether there is a frequency offset in the power grid;
[0155] When there is a frequency offset in the power grid, the phase offset information of the fundamental signal in the pre-selected adjacent cycles is calculated, and based on the phase offset information, the phase information of the fundamental signal is corrected through discrete Fourier transform to obtain the frequency offset information of the fundamental signal;
[0156] Based on the frequency offset information of the power grid, the frequency of the power grid is detected to obtain the frequency estimation information of the power grid;
[0157] For example, the above-mentioned judgment of whether there is a frequency offset in the power grid can be made by comparing the phase change of the fundamental signal with the ideal fundamental. For example, under ideal circumstances, the phase of the fundamental signal should change linearly at a constant frequency over time. If there is an offset in the frequency of the power grid, the phase change of the fundamental is no longer a simple linear relationship, but an offset will occur.
[0158] For example, when there is a frequency offset in the power grid, the process of calculating the phase offset information of the fundamental signal in pre-selected adjacent cycles, and correcting the phase information of the fundamental signal by discrete Fourier transform based on the phase offset information to obtain the frequency offset information of the fundamental signal may include:
[0159] When the fundamental frequency is offset, the actual angular frequency can be recorded as At this time, the sampling interval Sampling, we can get:
[0160]
[0161] in, Defined as the frequency deviation rate, Ω0 represents the rated fundamental angular frequency; ΔΩ represents the angular frequency deviation; f0 is the rated frequency; N is the total number of sampling points; s(k) represents the signal value at the kth sampling point; A represents the fundamental amplitude; Indicates the initial phase angle of the fundamental wave; B m Indicates the amplitude of the mth harmonic component; 2≤m≤M; M represents the highest harmonic order; Represents the initial phase angle of the mth harmonic component; note that the sampling sequence is not N-point as an integral period, so DFT actually needs to perform N-point rectangular windowing on s(k), then the fundamental phasor X at this time corresponds to:
[0162]
[0163] Where F represents the amplitude of the signal value s(k) after windowing, calculated by DFT; φ represents the phase of the signal value s(k) after windowing, calculated by DFT; A represents the fundamental amplitude; N represents the total number of sampling points; e represents the exponential function; j represents the current iteration number; represents the initial phase angle of the fundamental wave; λ represents the frequency deviation rate; φ and The phase angle difference between can be calculated as follows:
[0164]
[0165] Select two adjacent frequency sequences s in s(k) a (k) and s b (k), calculate the windowed DFT respectively, and obtain the phase angle φ of the two fundamental wave phasors respectively a and φ b , the calculation formula is as follows:
[0166]
[0167] Among them, φ a Represents the frequency sequence s a (k) The phase angle of the fundamental phasor; φ b Represents the frequency sequence s b (k) The phase angle of the fundamental phasor; Indicates the pair φ a Corrected true fundamental wave phase angle; Indicates the pair φ b The corrected true fundamental phase angle; λ represents the frequency deviation rate;
[0168] And because the corrected phase angle can satisfy the following equation:
[0169]
[0170] Substitute: The frequency deviation rate λ is obtained as follows:
[0171]
[0172] In this implementation, by analyzing the phase information of the fundamental signal, it is possible to accurately determine whether the power grid has frequency offset. When frequency offset occurs, the phase offset information between adjacent cycles can be used to accurately calculate and correct the frequency offset of the fundamental signal. Through this process, the discrete Fourier transform (DFT) is used to perform phase correction on the fundamental signal, ultimately resulting in a more accurate frequency estimation result. Because grid frequency fluctuations can affect the stability of phase information, correction techniques based on phase offset can significantly improve the accuracy of grid frequency detection, especially in the presence of frequency drift or sudden interference, effectively eliminating errors and maintaining frequency detection accuracy. By selecting a sequence of adjacent cycles and using a correction formula for the fundamental phasor, this implementation overcomes the accuracy loss of conventional methods in the presence of frequency offset. Furthermore, by performing phase analysis and frequency correction based on the discrete Fourier transform, it not only considers traditional phase information but also incorporates the dynamic characteristics of frequency offset, facilitating real-time tracking of grid frequency fluctuations and effectively addressing complex grid frequency changes.
[0173] In one implementation, the process of performing frequency detection on the power grid based on the frequency offset information of the power grid (i.e., the frequency offset rate λ in the above calculation formula) to obtain the frequency estimation information of the power grid may include:
[0174] The angular frequency of the power grid is estimated based on the frequency offset information of the power grid to obtain the angular frequency estimation information of the power grid;
[0175] Adaptive window smoothing is used to perform frequency correction on the angular frequency estimation information to obtain the frequency estimation information of the power grid;
[0176] For example, the expression of the angular frequency estimation information of the above-mentioned power grid can be as follows:
[0177]
[0178] in, Represents the preliminary estimated angular frequency information; λ represents the frequency deviation rate; Ω0 represents the rated fundamental angular frequency;
[0179] In this implementation, the process of performing frequency correction on the angular frequency estimation information using adaptive window smoothing to obtain the frequency estimation information of the power grid may include:
[0180] Under the interference of the residual intermediate harmonics of the signal, since the N-point sampling sequence is no longer a full-cycle sampling of the input voltage signal s(t), there will be a small amount of leakage of the interharmonic phasor in the fundamental phasor, resulting in errors in the calculation of the calculated spectrum offset information. Assuming that the frequency offset rate λ obeys the mean of 0 and the variance σ 2 The random distribution can use the currently calculated fundamental frequency and the fundamental period calculated at P-1 previous moments Averaging within a window of length P yields:
[0181]
[0182] Where P represents the adaptive window length; Represents the angular frequency estimation information within a window of length P; Z p represents the estimated value of the fundamental frequency at the pth historical moment; p = 1…P; Represents the preliminary estimated angular frequency estimation information, so as to obtain an estimate closer to the true value.
[0183] In actual operation, the selection of window length P should be limited. The present invention can use the following adaptive strategy to determine the optimal value of P:
[0184]
[0185] Among them, the maximum window length is 30, corresponding to 30 cycle width; For sequence The variance of L is the total number of sequences; K is the total number of modal components, and the purpose is to minimize the fluctuation of the calculated frequency estimate.
[0186] In this implementation, an adaptive window smoothing mechanism is introduced to smooth the current estimate using historical frequency data. This process effectively reduces errors caused by residual interharmonics and other noise sources in the signal, especially fluctuation errors caused by sampling bias, harmonic interference, or dynamic fluctuations during frequency estimation. By taking a weighted average of the historical frequency data within the window, instantaneous fluctuations can be effectively suppressed, ensuring that the frequency estimate is more stable and closer to the true value. Furthermore, an adaptive window length adjustment mechanism is adopted to further enhance the accuracy of frequency estimation. Based on the fluctuation characteristics of the signal, the window length is not fixed but dynamically adjusted according to the fluctuation of the frequency estimate. This flexible adjustment can select the optimal window length for the frequency fluctuation characteristics under different power grid conditions, thereby ensuring the accuracy and response speed of frequency estimation and helping to avoid over-smoothing or slow response. This design is particularly suitable for dynamic power grid environments and can effectively cope with different power grid disturbance conditions and provide real-time and accurate frequency monitoring. In this implementation, the effective combination of adaptive smoothing strategy and frequency offset information can increase adaptability to dynamic signal characteristics and effectively improve the response capability to frequency fluctuations. In addition, this implementation method can also consider combining the power grid's load forecast, real-time operating data, and historical frequency fluctuation trends, and introducing machine learning algorithms to predict frequency changes, which is conducive to improving the accuracy of frequency estimation and identifying possible frequency anomalies in advance.
[0187] In summary, the present invention aims to solve the problem that when the interference frequency is close to the fundamental frequency in the prior art, it is difficult to effectively separate the fundamental and interference components, resulting in a large error in the frequency estimation of the power grid. A power grid frequency detection method based on zero space tracking is proposed. The overall framework diagram is shown in FIG. Figure 3 As shown in the figure, for the input voltage waveform s(t), the zero space tracking algorithm (NSP signal decomposition) is used to decompose the voltage waveform into a series of fundamental modal components with narrowband signal characteristics. Then, the fundamental main modal component related to the voltage fundamental is low-pass filtered. After further removing the residual harmonic interference of the NSP decomposition, the relative offset of the fundamental frequency is solved by inversely calculating the phase difference by measuring the phase angle of the fundamental phasor of two adjacent sampling sequences, and the actual fundamental frequency estimation is calculated. Then, the estimation error caused by the interharmonic interference is corrected by the adaptive window smoothing method, and the fundamental frequency output is finally obtained. It enables the fundamental frequency in the power grid to be extracted and calculated quickly, accurately and effectively. The method of the present invention can realize adaptive narrowband decomposition of the signal in a nonlinear manner by adopting the NSP zero space tracking algorithm, and can eliminate harmonic and interharmonic interference near the fundamental mode while retaining the fundamental frequency component to the greatest extent. It is a new method for high-precision measurement of the instantaneous frequency of the power grid; and by measuring the fundamental phasor phase angle of two adjacent sampling sequences, combined with the adaptive window smoothing method to correct the estimation error caused by interharmonic interference, finally obtaining a high-precision calculation of the fundamental frequency, which can more accurately compensate for the leakage effect and eliminate the influence of interharmonics with frequencies close to the fundamental on phase measurement, thereby meeting the real-time monitoring requirements of transient processes in the power system.
[0188] Example 2:
[0189] In order to verify the correctness and effectiveness of the method proposed in this invention, a frequency detection process of a measured voltage signal is given through a specific embodiment. Specifically, the voltage data in this embodiment comes from a power and frequency oscillation event that occurs on-site at a certain energy storage power station AGC (Automatic Generation Control), and is recorded by the PMU (Phasor Measurement Unit) device during the disturbance. Among them, the voltage waveform of the A phase on the 110kV side is as follows Figure 4 As shown, the amplitude spectrum of the A-phase voltage waveform on the 110kV side is as follows: Figure 5 As shown, the fundamental frequency is calculated as Figure 6 As shown. Figure 4The 110kV side A phase voltage waveform shown in the figure shows that the AGC power oscillation event of the energy storage power station caused significant voltage fluctuations. Harmonic and interharmonic interference are superimposed on the waveform. After the input voltage signal is narrow-band decomposed by the zero space tracking (NSP) algorithm of the present invention, the fundamental main modal component is accurately extracted, and its amplitude spectrum ( Figure 5 ) shows that the energy is highly concentrated near the fundamental frequency (50Hz), while the high-frequency harmonic components (such as 100Hz, 150Hz, etc.) are effectively suppressed, indicating that NSP decomposition combined with low-pass filtering can significantly reduce the pollution of adjacent frequency interference to the fundamental component. The frequency offset rate is further inferred by the phase difference of adjacent cycles, and the fundamental frequency estimation after adaptive window smoothing correction is combined ( Figure 6 ) shows that the frequency fluctuation period (about 0.5 seconds) is highly synchronized with the power oscillation of the energy storage charging and discharging process, and the frequency valuation curve is smooth and stable, with the maximum deviation controlled within ±0.01Hz. This fully proves that the present invention can still achieve a fluctuation process of 110kV side voltage with a duration of about 0.5s in a non-stationary interference environment, which is consistent with the frequency measurement value fluctuation period, indicating that the system frequency measurement fluctuation is correlated with the current and active power fluctuations generated during the energy storage charging process.
[0190] In this embodiment, the DFT phase correction is used to dynamically compensate for the sampling error of non-integer cycles, which shows that the method of the present invention can overcome the sensitivity of the traditional frequency domain method to the leakage effect; and the adaptive window smoothing technology is used to optimize the window length (maximum 30 cycles) to effectively filter out the residual interference of interharmonics, so that the frequency estimation variance is reduced. In addition, the nonlinear narrowband isolation capability of the NSP decomposition shows that the method of the present invention can solve the separation problem of the traditional time domain method when the interference frequency is close to the fundamental wave, and ensure the purity of the fundamental wave main mode. In summary, this embodiment verifies the high precision, strong robustness and real-time tracking capability of the present invention in dynamic power disturbance scenarios through measured data, providing a reliable technical guarantee for the accurate monitoring of the grid frequency.
[0191] Example 3:
[0192] The present invention based on the same inventive concept also provides a power grid frequency detection system, the structural composition diagram is as follows Figure 7 Shown, including:
[0193] A narrowband decomposition module is used to perform narrowband signal decomposition on the input voltage signal of the acquired power grid using a null space tracking algorithm to obtain the fundamental main modal component of the input voltage signal;
[0194] A low-pass processing module is used to perform low-pass processing on the fundamental main modal component to obtain a fundamental signal of the fundamental main modal component;
[0195] The Fourier transform module is used to perform discrete Fourier transform on the fundamental signal to obtain the phase information of the fundamental signal;
[0196] The frequency detection module is used to calculate the phase offset information of the fundamental signal in the pre-selected adjacent cycles based on the phase information of the fundamental signal to obtain the frequency estimation information of the power grid.
[0197] In one implementation, the narrowband decomposition module may include:
[0198] A parameter initialization submodule is used to initialize the regularization parameter, energy balance coefficient, residual estimation value and maximum number of iterations according to the acquired input voltage signal of the power grid;
[0199] The equation solving submodule is used to solve the pre-built optimization equation according to the input voltage signal, the initialized regularization parameter, the energy balance coefficient, the residual estimate, and the maximum number of iterations to obtain the modal components of the input voltage signal;
[0200] The main mode selection submodule is used to select the modal component with the largest energy value from all modal components as the fundamental main modal component of the input voltage signal based on the modal components and the energy values of the modal components obtained.
[0201] In this implementation, the equation solving submodule may include:
[0202] A time-varying weight calculation unit, configured to calculate a time-varying weight function value based on an input voltage signal, an initialized regularization parameter, an energy balance coefficient, and a residual estimation value;
[0203] A regularization update unit, used to update the regularization parameters according to the time-varying weight function value;
[0204] A residual update unit, used to update the residual estimate according to the updated regularization parameter;
[0205] A balance coefficient updating unit, configured to update the energy balance coefficient according to the updated residual estimation value;
[0206] a component solving unit, configured to solve a pre-constructed optimization equation according to an updated regularization parameter, an updated residual estimate, and an updated energy balance coefficient until a maximum number of iterations is reached, and output a residual component of the input voltage signal;
[0207] The component output unit is used to perform a difference operation on the input voltage signal and the residual component of the input voltage signal to obtain each modal component of the input voltage signal.
[0208] For example, the above optimization equation can be expressed as follows:
[0209]
[0210] Where,
[0211]
[0212] Where U(t) represents the residual component at time t; α(t) represents the time-varying weight function value at time t; s(t) represents the input voltage signal at time t; λ1 represents the first regularization parameter; λ2 represents the second regularization parameter; γ represents the energy balance coefficient; D represents the preset second-order differential operator; V i (t) represents the modal component i at time t; i=1…K; K represents the total number of modal components.
[0213] In one implementation, the Fourier transform module may include:
[0214] The coefficient calculation submodule is used to perform discrete Fourier transform on the fundamental signal to obtain the frequency domain coefficient of the fundamental signal;
[0215] The phase calculation submodule is used to calculate the fundamental phasor of the fundamental signal according to the frequency domain coefficient, and use the fundamental phasor as the phase information of the fundamental signal;
[0216] The frequency domain coefficients include sine coefficients and cosine coefficients.
[0217] In one implementation, the frequency detection module may include:
[0218] The offset judgment submodule is used to judge whether there is a frequency offset in the power grid based on the phase information of the fundamental wave signal;
[0219] The phase correction submodule is used to calculate the phase offset information of the fundamental signal in the pre-selected adjacent cycles when there is a frequency offset in the power grid, and to correct the phase information of the fundamental signal through discrete Fourier transform based on the phase offset information to obtain the frequency offset information of the fundamental signal;
[0220] The frequency estimation submodule is used to detect the frequency of the power grid according to the frequency offset information of the power grid and obtain the frequency estimation information of the power grid.
[0221] In this implementation, the frequency estimation submodule may include:
[0222] An angular frequency estimation unit is used to estimate the angular frequency of the power grid according to the frequency offset information of the power grid to obtain angular frequency estimation information of the power grid;
[0223] The frequency correction unit is used to perform frequency correction on the diagonal frequency estimation information by using an adaptive window to smooth the diagonal frequency to obtain frequency estimation information of the power grid.
[0224] Example 4:
[0225] like Figure 8 As shown, the present invention also provides an electronic device, which may be a computer, a single-chip microcomputer, a smart mobile device, or the like. The electronic device in this embodiment may include a processor, a memory, a transceiver component, and the like. The memory, processor, and transceiver component are connected via a bus; the memory may be used to store an execution program, which may include instructions; and the processor may be used to execute the instructions stored in the memory. The memory may also be used to store data, which may be accessed and / or modified during the execution of the instructions.
[0226] The processor may be a central processing unit (CPU), or may be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. It is the computing core and control core of the terminal, which is suitable for implementing one or more instructions, specifically suitable for loading and executing one or more instructions in a storage medium to implement the corresponding method flow or corresponding function, so as to implement the steps of a power grid frequency detection method in the above-mentioned embodiment.
[0227] Example 5:
[0228] Based on the same inventive concept, the present invention also provides a readable storage medium, specifically an electronic device readable storage medium (Memory), which is a memory device in an electronic device for storing programs and data. It can be understood that the storage medium here can include both built-in storage media in the electronic device and, of course, extended storage media supported by the electronic device. The storage medium provides a storage space, which stores the operating system of the terminal. In addition, one or more instructions suitable for being loaded and executed by the processor are also stored in the storage space. These instructions can be one or more execution programs (including program codes). It should be noted that the storage medium here can be a high-speed RAM memory or a non-volatile memory, such as at least one disk memory. The processor loads and executes one or more instructions stored in the storage medium to implement the steps of a power grid frequency detection method in the above embodiment.
[0229] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0230] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowcharts and / or block diagrams, as well as combinations of processes and / or blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowcharts and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0231] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0232] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0233] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit its scope of protection. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that after reading the present invention, those skilled in the art may still make various changes, modifications or equivalent substitutions to the specific implementation methods of the application, but these changes, modifications or equivalent substitutions are all within the scope of protection of the pending claims.
Claims
1. A method for detecting power grid frequency, characterized in that: include: Performing narrowband signal decomposition on the acquired input voltage signal of the power grid using a zero space tracking algorithm to obtain a fundamental main modal component of the input voltage signal; Performing low-pass processing on the fundamental wave main modal component to obtain a fundamental wave signal of the fundamental wave main modal component; Performing discrete Fourier transform on the fundamental wave signal to obtain phase information of the fundamental wave signal; According to the phase information of the fundamental wave signal, the phase offset information of the fundamental wave signal in the pre-selected adjacent cycles is calculated to obtain the frequency estimation information of the power grid.
2. The method according to claim 1, wherein The method of performing narrowband signal decomposition on the acquired input voltage signal of the power grid by using the zero space tracking algorithm to obtain the fundamental main modal component of the input voltage signal includes: Initialize the regularization parameter, energy balance coefficient, residual estimation value and maximum number of iterations according to the obtained input voltage signal of the power grid; Solving a pre-constructed optimization equation according to the input voltage signal, the initialized regularization parameter, the energy balance coefficient, the residual estimate, and the maximum number of iterations to obtain each modal component of the input voltage signal; Based on the modal components and the acquired energy values of the modal components, a modal component with a maximum energy value is selected from all the modal components as the fundamental main modal component of the input voltage signal.
3. The method according to claim 2, wherein The pre-constructed optimization equation is solved according to the input voltage signal, the initialized regularization parameter, the energy balance coefficient, the residual estimate, and the maximum number of iterations to obtain the modal components of the input voltage signal, including: Calculating a time-varying weight function value according to the input voltage signal, the initialized regularization parameter, the energy balance coefficient, and the residual estimate; Updating the regularization parameter according to the time-varying weight function value; Updating the residual estimate according to the updated regularization parameter; updating the energy balance coefficient according to the updated residual estimate; Solving the pre-constructed optimization equation according to the updated regularization parameter, the updated residual estimate, and the updated energy balance coefficient until the maximum number of iterations is reached, and outputting the residual component of the input voltage signal; A difference operation is performed on the input voltage signal and a residual component of the input voltage signal to obtain each modal component of the input voltage signal.
4. The method according to claim 2 or 3, wherein: The expression of the optimization equation is as follows: Where, Where U(t) represents the residual component at time t; α(t) represents the time-varying weight function value at time t; s(t) represents the input voltage signal at time t; λ1 represents the first regularization parameter; λ2 represents the second regularization parameter; γ represents the energy balance coefficient; D represents the preset second-order differential operator; V i (t) represents the modal component i at time t; i=1…K; K represents the total number of modal components.
5. The method according to claim 1, wherein The performing discrete Fourier transform on the fundamental wave signal to obtain phase information of the fundamental wave signal includes: Performing a discrete Fourier transform on the fundamental wave signal to obtain a frequency domain coefficient of the fundamental wave signal; Calculating a fundamental wave phasor of the fundamental wave signal according to the frequency domain coefficient, and using the fundamental wave phasor as phase information of the fundamental wave signal; The frequency domain coefficients include: sine coefficients and cosine coefficients.
6. The method according to claim 1, wherein The step of calculating the phase offset information of the fundamental wave signal in pre-selected adjacent cycles based on the phase information of the fundamental wave signal to obtain the frequency estimation information of the power grid includes: determining whether the power grid has a frequency offset according to the phase information of the fundamental wave signal; When the power grid has a frequency offset, calculating the phase offset information of the fundamental wave signal in pre-selected adjacent cycles, and correcting the phase information of the fundamental wave signal by discrete Fourier transform according to the phase offset information to obtain the frequency offset information of the fundamental wave signal; The frequency of the power grid is detected according to the frequency offset information of the power grid to obtain frequency estimation information of the power grid.
7. The method according to claim 6, wherein The performing frequency detection on the power grid according to the frequency offset information of the power grid to obtain frequency estimation information of the power grid includes: estimating the angular frequency of the power grid according to the frequency offset information of the power grid to obtain angular frequency estimation information of the power grid; Adaptive window smoothing is used to perform frequency correction on the angular frequency estimation information to obtain frequency estimation information of the power grid.
8. A power grid frequency detection system, characterized in that: include: a narrowband decomposition module, configured to perform narrowband signal decomposition on the acquired input voltage signal of the power grid using a null space tracking algorithm to obtain a fundamental main modal component of the input voltage signal; A low-pass processing module, configured to perform low-pass processing on the fundamental main modal component to obtain a fundamental signal of the fundamental main modal component; A Fourier transform module, configured to perform discrete Fourier transform on the fundamental wave signal to obtain phase information of the fundamental wave signal; The frequency detection module is used to calculate the phase offset information of the fundamental wave signal in the pre-selected adjacent cycles according to the phase information of the fundamental wave signal to obtain the frequency estimation information of the power grid.
9. The system according to claim 8, wherein The narrowband decomposition module includes: A parameter initialization submodule is used to initialize the regularization parameter, energy balance coefficient, residual estimation value and maximum number of iterations according to the acquired input voltage signal of the power grid; an equation solving submodule, configured to solve a pre-constructed optimization equation according to the input voltage signal, an initialized regularization parameter, an energy balance coefficient, a residual estimate, and a maximum number of iterations to obtain modal components of the input voltage signal; The main mode selection submodule is used to select the modal component with the largest energy value from all the modal components as the fundamental main modal component of the input voltage signal based on the modal components and the energy values of the modal components obtained.
10. The system according to claim 9, wherein The equation solving submodule includes: A time-varying weight calculation unit, configured to calculate a time-varying weight function value based on the input voltage signal, the initialized regularization parameter, the energy balance coefficient, and the residual estimate; A regularization updating unit, configured to update the regularization parameter according to the time-varying weight function value; A residual updating unit, configured to update the residual estimation value according to the updated regularization parameter; a balance coefficient updating unit, configured to update the energy balance coefficient according to the updated residual estimation value; a component solving unit, configured to solve a pre-constructed optimization equation according to the updated regularization parameter, the updated residual estimate, and the updated energy balance coefficient until the maximum number of iterations is reached, and output a residual component of the input voltage signal; The component output unit is used to perform a difference operation on the input voltage signal and the residual component of the input voltage signal to obtain each modal component of the input voltage signal.
11. The system according to claim 9 or 10, characterized in that The expression of the optimization equation is as follows: Where, Where U(t) represents the residual component at time t; α(t) represents the time-varying weight function value at time t; s(t) represents the input voltage signal at time t; λ1 represents the first regularization parameter; λ2 represents the second regularization parameter; γ represents the energy balance coefficient; D represents the preset second-order differential operator; V i (t) represents the modal component i at time t; i=1…K; K represents the total number of modal components.
12. The system according to claim 8, wherein The Fourier transform module comprises: A coefficient calculation submodule, configured to perform discrete Fourier transform on the fundamental wave signal to obtain frequency domain coefficients of the fundamental wave signal; a phase calculation submodule, configured to calculate a fundamental phasor of the fundamental signal according to the frequency domain coefficient, and use the fundamental phasor as phase information of the fundamental signal; The frequency domain coefficients include: sine coefficients and cosine coefficients.
13. The system according to claim 8, wherein The frequency detection module includes: an offset judgment submodule, configured to judge whether the power grid has a frequency offset based on the phase information of the fundamental wave signal; a phase correction submodule, configured to calculate, when there is a frequency offset in the power grid, the phase offset information of the fundamental wave signal in pre-selected adjacent cycles, and to correct the phase information of the fundamental wave signal by discrete Fourier transform according to the phase offset information to obtain the frequency offset information of the fundamental wave signal; The frequency estimation submodule is configured to perform frequency detection on the power grid according to the frequency offset information of the power grid to obtain frequency estimation information of the power grid.
14. The system according to claim 13, wherein: The frequency estimation submodule includes: an angular frequency estimation unit, configured to estimate the angular frequency of the power grid according to the frequency offset information of the power grid to obtain angular frequency estimation information of the power grid; A frequency correction unit is used to perform frequency correction on the angular frequency estimation information by using an adaptive window smoothing to obtain frequency estimation information of the power grid.
15. An electronic device, characterized in that: include: at least one processor and memory; The memory and the processor are connected via a bus; The memory is used to store one or more programs; When the one or more programs are executed by the at least one processor, a power grid frequency detection method according to any one of claims 1 to 7 is implemented.
16. A computing device readable storage medium, characterized in that: An execution program is stored thereon, and when the execution program is executed, a power grid frequency detection method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Electric signal fundamental frequency measuring method and system
CN104535836A
Fourier algorithm-based power system frequency measuring method
CN108333426A
Bearing fault diagnosis method, terminal equipment and computer storage medium
CN110991004A
Frequency estimation method and device based on analytic compensation on harmonics effects in power system
KR102735104B1
Cited By
Harmonic tracking method and device of power supply system, computer equipment and storage medium
CN120891265A
Harmonic tracking method and device of power supply system, computer device and storage medium
CN120891265B
A power grid frequency-aware method, system, device, and medium
CN122612997A