A wideband power grid harmonic fast extraction method based on multi-scale collaborative measurement

By constructing a multi-window parallel data buffer and an adaptive window function, combined with zero-point phase alignment, we have achieved rapid locking and steady-state high-precision extraction of broadband power grid harmonics. This solves the problem of balancing speed and accuracy in existing methods and improves the dynamic adaptability and noise resistance of the measurement.

CN121899485BActive Publication Date: 2026-06-05SHANDONG UNIV

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2026-03-24
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

Existing methods struggle to achieve fast and accurate harmonic extraction in broadband power grids. Fast Fourier Transform algorithms are limited by fixed time windows, leading to sluggish dynamic response. Short windows face spectral leakage and picket-fence effects. Other methods have high computational loads or are sensitive to noise, making it difficult to meet the requirements of online real-time applications.

Method used

A multi-scale collaborative measurement method is adopted to construct a multi-window parallel data buffer. The weights are dynamically allocated using the S-shaped cosine transition function. Combined with the adaptive window function and phase alignment based on the zero time point, the fast locking and steady-state high-precision extraction of harmonic information are achieved.

Benefits of technology

It enables rapid capture and steady-state high-precision measurement of broadband power grid harmonics without increasing hardware costs, solving the engineering contradiction of "inaccurate measurement" and "slow tracking", and improving the dynamic adaptability and noise resistance reliability of the measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121899485B_ABST
    Figure CN121899485B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of wide frequency power grid harmonic fast extraction method based on multiscale collaborative measurement, belong to the field of power system harmonic analysis, including: construct multi-window parallel data buffer, utilize smooth transition function dynamically calculate the confidence weight of each window;Adopt adaptive window function strategy to load rectangular window and Blackman window respectively, and preliminary obtain full-band spectrum parameter in combination with zero padding FFT, introduce phase alignment algorithm based on time zero point to eliminate the phase drift caused by non-synchronous sampling;For random interference, use stability filtering mechanism to carry out effectiveness check.The present application realizes the unity of wide frequency harmonic transient fast locking and steady-state high-precision measurement by organically combining multi-window parallel processing with S-shaped smooth transition mechanism, significantly improves the dynamic adaptability and anti-noise reliability of measurement, and provides reliable technical foundation for new type power system wide frequency oscillation monitoring and control.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement, belonging to the field of power system harmonic analysis technology. Background Technology

[0002] With the construction of new power systems, the penetration of high-proportion power electronic devices has fundamentally changed the stability characteristics of the power grid. The interaction between the asynchronous switching of power electronic converters and their control circuits and the grid impedance introduces a large number of broadband inter-harmonics. These broadband oscillations can easily cause voltage amplitude exceeding limits, threatening grid security.

[0003] Against this backdrop, the rapid and accurate extraction of broadband harmonics is crucial, but existing methods struggle to balance speed and accuracy. Mainstream fast Fourier transform algorithms are limited by fixed time windows: long windows lead to sluggish dynamic response, failing to meet rapid control requirements; short windows suffer from severe spectral leakage and picket-fence effects, resulting in large measurement errors. Other methods, such as wavelet transform, Prony algorithm, and Kalman filtering, while theoretically advantageous, suffer from high computational load, sensitivity to noise, or reliance on precise models, making them unsuitable for online real-time applications.

[0004] Therefore, there is an urgent need for a method that can both inherit the low computational cost advantage of the Fast Fourier Transform and overcome the shortcomings of a single time window through multi-scale collaborative analysis, so as to solve the engineering problems of "inaccuracy" and "slowness" in broadband power grid harmonic extraction. Summary of the Invention

[0005] To address the challenge of simultaneously achieving rapid capture and accurate measurement of harmonics in broadband power grids with a high proportion of renewable energy access, this invention proposes a method for rapid harmonic extraction from broadband power grids based on multi-scale collaborative measurement. This method constructs a multi-window parallel data buffer, dynamically allocates weights using an S-shaped cosine transition function, refines parameters by combining an adaptive window function with phase alignment based on time zero point, and introduces a stability filtering mechanism to achieve rapid locking and steady-state high-precision extraction of harmonic information.

[0006] The present invention adopts the following technical solution:

[0007] A method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement includes the following steps:

[0008] S1, construct a multi-resolution parallel data buffer, including three types of windows: harmonic sampling window, interharmonic fast extraction window, and interharmonic precise extraction window, to discretize the acquired signal, and set three types of windows for transient capture, transition tracking and steady-state measurement of the signal respectively.

[0009] S2, based on the current system runtime, uses a smooth transition function to dynamically calculate the confidence weight of each window, thereby achieving smooth switching between different resolution modes;

[0010] S3, for the signal segments within each window, adaptively selects the window function type for weighted truncation, uses zero-padding fast Fourier transform and full-band peak search to obtain spectral parameters, and introduces a phase alignment algorithm based on time zero point to eliminate phase drift caused by asynchronous sampling and obtain accurate single-window parameters;

[0011] S4. Based on the dynamically calculated confidence weights, the amplitude, frequency, and phase output of each window are fused using a multi-scale collaborative method to obtain the preliminary parameters after fusion.

[0012] S5 performs stability filtering on the initial parameters after fusion based on historical trajectory backtracking. It only determines the parameters as valid and outputs them when they are continuously and stably present, thus achieving highly reliable measurement with strong noise resistance.

[0013] Preferably, in step S1, the three types of windows are set as follows:

[0014] The resolution of the harmonic sampling window is 50Hz, the resolution of the interharmonic fast extraction window is 10Hz, and the resolution of the interharmonic precise extraction window is 1Hz.

[0015] Preferably, the duration of the harmonic sampling window =20ms, duration of the interharmonic fast extraction window =100ms, duration of the precise interharmonic extraction window =1s.

[0016] Preferably, in step S2, the smooth transition function adopts an S-shaped cosine transition function. The mathematical expression is:

[0017] (2)

[0018] in, This is the current system uptime. For the transition start time, This is the end time of the transition.

[0019] Preferably, in step S2, the process of dynamically calculating the confidence weight of each window is as follows:

[0020] The weight of the interharmonic precise extraction window is directly determined by the S-shaped cosine transition function centered at the moment when the window is filled with data; the weight of the interharmonic fast extraction window is activated by the S-shaped cosine transition function at the moment when the window is filled with data, but it decreases proportionally as the weight of the interharmonic precise extraction window increases; the weight of the harmonic sampling window is used to fill the remaining space to ensure that the sum of the weights of the three windows is always 1.

[0021] Preferred interharmonic precise extraction window weights for:

[0022] (5)

[0023] in, This indicates the accurate extraction window coefficients for interharmonics. ;

[0024] Interharmonic fast extraction window weights for:

[0025] (6)

[0026] in, This indicates the rapid extraction of window coefficients for interharmonics. ;

[0027] Harmonic sampling window weights for:

[0028] (7).

[0029] Preferably, in step S3, the process of adaptively selecting the window function type is as follows:

[0030] When the target frequency is an integer multiple of the power frequency and is within the harmonic sampling window, a rectangular window is automatically switched to utilize orthogonality for rapid extraction. When the target frequency is an interharmonic or is in another window, a Blackman window is used to suppress spectral leakage.

[0031] Preferably, in step S4, the multi-scale collaborative fusion process is as follows:

[0032] For amplitude and frequency, the estimated values ​​of each window are multiplied by their corresponding confidence weights and then summed for a linear weighted average. For phase, the confidence weights of each window are compared, and the phase estimate corresponding to the window with the largest weight is directly selected as the output.

[0033] Preferably, in step S5, the stability filtering process is as follows:

[0034] Before confirming the validity of the initial parameters after fusion, the initial parameters are temporarily stored in a data buffer. When the number of frames in which the parameters remain stable continuously reaches a threshold, the temporarily stored data is output all at once, and the system switches to real-time output mode. If the threshold is not reached, the data is judged as noise interference and the data in the data buffer is discarded. This step effectively filters out random noise interference, and finally outputs highly reliable amplitude, frequency, and phase measurement results.

[0035] Preferably, the threshold during the stability filtering process is 5 frames.

[0036] For any details not covered in this invention, please refer to the prior art.

[0037] The beneficial effects of this invention are as follows:

[0038] This invention enables rapid capture of signal changes using a harmonic sampling window during the initial stage of system startup, stable tracking using a rapid interharmonic extraction window during the transition period, and high-precision measurement using a precise interharmonic extraction window during the steady-state period, with a smooth and seamless process throughout.

[0039] This invention constructs a multi-window parallel data buffer, dynamically allocates weights using an S-shaped cosine transition function, refines parameters by combining an adaptive window function with phase alignment based on time zero, and introduces a stability filtering mechanism to achieve rapid locking and steady-state high-precision extraction of harmonic information. Without increasing hardware costs, it effectively solves the engineering contradictions of "inaccuracy" and "slowness" in broadband power grid harmonic extraction through multi-scale collaboration at the algorithm level. Attached Figure Description

[0040] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an undue limitation of this application.

[0041] Figure 1 The flowchart shows the broadband power grid harmonic rapid extraction method based on multi-scale collaborative measurement according to the present invention.

[0042] Figure 2 This is a schematic diagram of the broadband power grid harmonic rapid extraction method based on multi-scale collaborative measurement according to the present invention;

[0043] Figure 3 The time-domain and frequency-domain models of the Blackman window and the rectangular window are shown; where (a) is the time-domain model of the window function used, and (b) is the frequency-domain model of the window function used.

[0044] Figure 4 This is a schematic diagram of the principle of the S-shaped cosine transition function of the present invention.

[0045] Figure 5The diagram illustrating the dynamic evolution of collaborative weights provided by this invention;

[0046] Figure 6 The present invention provides the parameter extraction trajectories for the fundamental wave, second harmonic, and third harmonic, wherein (a) is the frequency parameter extraction trajectory, (b) is the amplitude parameter extraction trajectory, and (c) is the phase parameter extraction trajectory.

[0047] Figure 7 The parameters extraction trajectories for each frequency component using a single interharmonic precise extraction window are shown in (a) for frequency parameter extraction, (b) for amplitude parameter extraction, and (c) for phase parameter extraction.

[0048] Figure 8 The method of the present invention provides the parameter extraction trajectory for each frequency component, wherein (a) is the frequency parameter extraction trajectory, (b) is the amplitude parameter extraction trajectory, and (c) is the phase parameter extraction trajectory. Detailed Implementation

[0049] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this invention will be clearly and completely described below with reference to the accompanying drawings. However, this is not the only description; all aspects not described in detail herein are based on conventional techniques in the art.

[0050] Example 1

[0051] To address the shortcomings of Fast Fourier Transform (FFT) in processing high-proportion interharmonics from renewable energy sources, such as spectral leakage, picket fence effect, and the difficulty of balancing speed and accuracy with a single window, this invention proposes a broadband power grid harmonic extraction method based on multi-scale collaborative measurement. This method can achieve rapid transient locking and high-precision steady-state measurement under noisy conditions without requiring a pre-existing model. Figure 1 and Figure 2 As shown, it includes the following steps:

[0052] S1 constructs a multi-resolution parallel data buffer, including three types of windows: harmonic sampling window, interharmonic fast extraction window, and interharmonic precise extraction window. The acquired signal is discretized, and the three types of windows are used for transient signal capture, transition tracking, and steady-state measurement, respectively. Specifically:

[0053] To address the spectral characteristics of the power frequency voltage component, characteristic interharmonics, and non-characteristic interharmonics, multi-resolution sampling windows were constructed to adapt to them. A parallel data buffer was then built through the cooperation of these three windows. Let the discretized signal be x[n], and the sampling rate be... In any At any given time, the system will construct three time windows of different lengths: the harmonic sampling window ( Interharmonic fast extraction window ( Interharmonic precise extraction window ( Define the i-th type of window (where ∈{ , , Intercepting signal of}) for:

[0054] (1)

[0055] in: For the first The duration of the type window. In this embodiment, the harmonic sampling window... =20ms, used for quickly capturing faults or sudden changes; interharmonic fast extraction window. =100ms, used for stable tracking during the transition phase; interharmonic precise extraction window. =1s, used for high-precision measurement under steady-state conditions. = × The number of sampling points in the window. Set to 10kHz. A window function that is adaptively selected based on the window type.

[0056] S2, based on the current system runtime, uses a smooth transition function to dynamically calculate the confidence weight of each window, thereby achieving smooth switching between different resolution modes;

[0057] S3, for the signal segments within each window, adaptively selects the window function type for weighted truncation, uses zero-padding fast Fourier transform and full-band peak search to obtain spectral parameters, and introduces a phase alignment algorithm based on time zero point to eliminate phase drift caused by asynchronous sampling and obtain accurate single-window parameters;

[0058] S4. Based on the dynamically calculated confidence weights, the amplitude, frequency, and phase output of each window are fused using a multi-scale collaborative method to obtain the preliminary parameters after fusion.

[0059] S5 performs stability filtering on the initial parameters after fusion based on historical trajectory backtracking. It only determines the parameters as valid and outputs them when they are continuously and stably present, thus achieving highly reliable measurement with strong noise resistance.

[0060] This invention organically combines multi-window parallel processing with an S-shaped smooth transition mechanism to achieve the unification of broadband harmonic transient rapid locking and steady-state high-precision measurement, significantly improving the dynamic adaptability and noise resistance reliability of the measurement, and providing a reliable technical foundation for broadband oscillation monitoring and control of new power systems.

[0061] Example 2

[0062] A method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement, as described in Example 1, differs in that, in step S1, the three types of windows are respectively set as follows:

[0063] The resolution of the harmonic sampling window is 50Hz, the resolution of the interharmonic fast extraction window is 10Hz, and the resolution of the interharmonic precise extraction window is 1Hz.

[0064] Example 3

[0065] A method for rapid harmonic extraction from a broadband power grid based on multi-scale collaborative measurement is presented in Example 2. The difference lies in step S2, where a dynamic weight allocation function based on the current running time is constructed to achieve a smooth transition from fast response to high precision. In this example, the smooth transition function employs an S-shaped cosine transition function. The mathematical expression is:

[0066] (2)

[0067] in, This is the current system uptime. For the transition start time, This is the end time of the transition.

[0068] This function uses the current system uptime. As the independent variable, the transition start time is used. and the end of the transition These are control parameters. To more clearly describe the mathematical properties of this function, Figure 4 The setting was revealed. and The schematic diagrams for 2s and 6s are only illustrations of the normalized form of the function. Combined with image analysis, when the system time has not reached the set startup threshold... When the system time exceeds the termination threshold, the function output is always 0, indicating that the corresponding window has not yet intervened; when the system time exceeds the termination threshold... When the function output is always 1, it indicates that the transition process is complete and the corresponding window enters the steady-state operation phase with full weight. Between the two threshold times, an S-shaped smooth curve is constructed using the characteristics of the normalization factor and the cosine function. and The first derivatives at both time points are zero, ensuring the smoothness of the data flow during multi-scale window fusion.

[0069] Example 4

[0070] A method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement, as described in Example 3, differs in that, in step S2, to describe the weight allocation process of each window, two independent S-shaped transition coefficients are first defined using the aforementioned S-shaped cosine transition function. and , which correspond to the activation levels of the interharmonic fast extraction window and the interharmonic precise extraction window, respectively.

[0071] Interharmonic fast extraction window coefficient :

[0072] (3)

[0073] Interharmonic accurate extraction window coefficient :

[0074] (4)

[0075] In this embodiment, the selection of the weight switching time node for each window is not arbitrarily set, but is calculated based on the dual constraints of data integrity of the data buffer and smoothness of dynamic response.

[0076] Intervention time Strictly corresponding to the physical filling time of each window's data buffer, for the interharmonic fast extraction window, the system must acquire at least 0.1s of time-domain data before performing a fast Fourier transform. Before this, due to insufficient data length, the weight of the interharmonic fast extraction window must be forced to 0; therefore, the intervention time for this window is set to 0.1s. For the interharmonic precise extraction window, the system must acquire at least 1s of time-domain data; therefore, the intervention time for this window is set to 1s. If the switching time is too short, the frequency or amplitude deviation calculated by different resolution windows will cause a significant "step" in the output result. If the switching time is too long, it will delay the dominant role of the high-precision window, causing the system to be dragged down by the low-precision window when it should enter the high-precision measurement stage. 0.05s corresponds to 2.5 cycles of the power system's operating frequency. Under the control of the S-shaped cosine transition function, the smooth evolution of 2.5 cycles is sufficient to disperse the energy of numerical switching, ensuring both the continuous differentiability of the output waveform and ensuring that the high-precision result can take over the system output in a timely manner. The transition time was set to 0.15s and 1.05s respectively, thus ensuring a transition duration of 2.5 cycles.

[0077] Based on the aforementioned transition coefficients, the weights of each window are allocated as follows according to the system operation phase:

[0078] (1) Window weighting for accurate extraction of interharmonics It has the highest priority and is directly determined by the window coefficient. Decide:

[0079] (5)

[0080] (2) Interharmonic fast extraction window weight : By window coefficient The decision is made, but it is suppressed by the weight of the interharmonic precise extraction window.

[0081] (6)

[0082] (3) Weight of the harmonic sampling window : Fill the remaining weight space, have the lowest priority and ensure a total weight of 1.

[0083] (7)

[0084] The final weight vector W=[ , , This enables seamless soft switching between different resolution modes. Figure 5 The dynamic evolution of the weights of each window is shown, with the blue curve representing the confidence weight of the harmonic sampling window. The evolution process is shown in red, where the confidence weight of the interharmonic fast extraction window is represented. The evolution process is shown in the figure, and the orange curve represents the confidence weight of the interharmonic precise extraction window. The evolution process of .

[0085] As can be seen, in this embodiment, the weight of the interharmonic precise extraction window is directly determined by the S-shaped cosine transition function centered at the moment when the window is filled with data; the weight of the interharmonic fast extraction window is activated by the S-shaped cosine transition function at the moment when the data is filled, but decreases proportionally as the weight of the interharmonic precise extraction window increases; the weight of the harmonic sampling window is used to fill the remaining space to ensure that the sum of the weights of the three windows is always 1.

[0086] Example 5

[0087] A method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement, as described in Example 4, differs in that the adaptive selection of the window function type in step S3 is as follows:

[0088] Considering that interharmonic frequencies are often non-integer multiples, asynchronous sampling can lead to severe spectral leakage. Therefore, the Blackman window function is preferred under both fast and accurate interharmonic extraction windows. Utilizing its excellent sidelobe attenuation characteristics, although the main lobe is slightly wider, it can significantly reduce the spectral sidelobes of strong signals, thereby achieving a higher dynamic range in the frequency domain and ensuring that weak interharmonic signals can stand out from the strong fundamental wave's sidelobe background. Its mathematical expression is:

[0089] (8)

[0090] in Represents the Blackman window function;

[0091] For the harmonic sampling window, the duration is 20ms. When the algorithm detects harmonics that are integer multiples of the power frequency, the orthogonality condition is satisfied because the signal cutoff length is exactly an integer multiple of the signal period. In this case, a rectangular window is automatically switched. Although the rectangular window has higher sidelobes, it has the narrowest main lobe width, providing the fastest frequency response with ground delay, and does not produce leakage under full-cycle sampling, thus avoiding main lobe energy loss caused by windowing. Its mathematical expression is:

[0092] (9)

[0093] in Represents a rectangular window function;

[0094] To better understand the characteristics of the two window functions, Figure 3 (a) and (b) respectively provide the time-domain and frequency-domain models of the window function used in this invention.

[0095] During the signal processing phase, the system first selects the appropriate time window length based on the current running time, and then shapes the signal according to the adaptively selected window function. Subsequently, the windowed signal segment... Perform a Fast Fourier Transform to convert the time-domain signal into a frequency-domain signal X. i (k):

[0096] (10)

[0097] in, Representing the One frequency component, Represents the rotation factor, used to extract specific frequencies. .

[0098] This embodiment employs a full-band peak search strategy. First, a rapid scan is performed across the entire frequency band to filter out all spectral peaks with amplitudes exceeding a set threshold. Then, the peaks that meet the criteria are sorted from largest to smallest amplitude, and their corresponding peak indices are extracted. This maps to the current set of candidate target frequencies. To refine the parameters, the system will use this set of candidate target frequencies. Substituting the data into three windows of different scales, the truncated time-domain signal segments are first zero-padded before performing the Fast Fourier Transform to significantly increase the frequency-domain sampling density, thereby effectively eliminating the picket fence effect. On the zero-padded high-density spectrum, the candidate target frequencies are then roughly obtained. Centered on this framework, a local adaptive search bandwidth is constructed, setting the bandwidth of one side of the search to half the physical frequency resolution of the current window, while maintaining a lower limit of at least 5Hz. This design ensures complete coverage of the wide main lobe in low-resolution windows, while preventing the loss of real signals with slight frequency offsets due to an excessively narrow search range in high-resolution windows. Finally, within the constructed local adaptive search bandwidth, a maximum value search is performed again to precisely pinpoint the optimal spectral index within this interval. This completes the fine-tuning of harmonic parameters within a single window. Based on the optimal index found... The corrected precise frequency can be obtained by inverse solving the following formula. With physical amplitude :

[0099] (11)

[0100] (12)

[0101] in, The FFT complex spectrum after zero-padding. The system sampling rate, This represents the total number of points in the FFT after padding with zeros. The coherence gain of the window function is used to compensate for the energy attenuation caused by windowing and restore the spectral amplitude to the true physical amplitude.

[0102] Due to the mathematical properties of the Fast Fourier Transform (FFT), the calculated phase spectrum is based on the relative phase at the start of the current sampling window, rather than the absolute phase based on a globally unified time axis. In real-time monitoring systems, as the sampling window slides forward over time, the window's initial reference point also changes continuously. This causes the directly read FFT phase to exhibit a continuous linear rotation, even if the signal's own phase remains constant. To eliminate this asynchronous sampling error caused by window sliding, this invention proposes a phase alignment algorithm based on a time zero point. This algorithm utilizes the precise frequency obtained in the previous step... This restores the relative phase to the absolute phase in a unified reference frame. The specific calculation formula is as follows:

[0103] (13)

[0104] in, This is the accurate original phase angle extracted at the optimal spectral index after zero-padded FFT transformation. The current system uptime. For the first Length of time for the window type This is the absolute start time of the current sampling window. The precise frequency output by equation (11) is used. By substituting this precise frequency, the phase accumulation drift caused by frequency error is effectively suppressed, ensuring a stable and uniform absolute phase output under different time scale windows. Finally, in order to conform to the power system analysis habits, the calculated phase is converted to the angle system and normalized to the principal value interval, so that it is mapped to the range of [-180°, 180°).

[0105] (14)

[0106] in, The phase after normalization. The absolute phase is calculated using formula (13), and mod represents the remainder operation.

[0107] Example 6

[0108] A method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement, as described in Example 5, differs in that the multi-scale collaborative fusion process in step S4 is as follows:

[0109] For amplitude and frequency, the estimated values ​​of each window are multiplied by their corresponding confidence weights, summed, and then averaged linearly. For phase, the confidence weights of each window are compared, and the phase estimate corresponding to the window with the highest weight is directly selected as the output. Specifically:

[0110] For amplitude and frequency characteristics, this invention adopts a linear weighted averaging strategy to fully utilize the advantages of each window at different time periods:

[0111] (15)

[0112] (16)

[0113] in, This represents the final predicted amplitude after linear weighting; This represents the final predicted frequency after linear weighting; This represents the amplitude calculated using equation (12); This represents the precise frequency calculated using equation (11);

[0114] Because phase has periodicity, linear weighting can lead to incorrect results. Therefore, this embodiment employs a maximum confidence optimization strategy, directly selecting the phase value corresponding to the window with the highest current weight as the final output, thereby avoiding phase ambiguity issues that may arise from weighted calculations.

[0115] (17)

[0116] in, . This represents the maximum value operator, used to determine the index position of the maximum weight. It represents the normalized phase value calculated by the window with the largest confidence weight at the current moment; it is calculated by equations (13) and (14) under the window with the largest confidence weight and is directly used as the final phase output of the system.

[0117] Example 7

[0118] A method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement, as described in Example 6, differs in that although the smoothness of the parameters after weighted fusion is improved, spurious frequency components induced by transient noise may still remain. To ensure the robustness of the output results, this embodiment introduces a stability filtering mechanism in the final output stage. For newly emerging frequency components, the system does not immediately output them as valid results, but temporarily stores them in a data buffer for continuous monitoring. The stability counting threshold is set to 5 frames (approximately 50ms). Only when the component continuously and stably tracks the data buffer to reach this threshold is the system determined to be a valid signal, performs a historical data recovery operation, releases the temporarily stored data in the data buffer all at once, and then switches to real-time output mode; conversely, if the signal is interrupted before reaching the threshold, it is determined to be short-term pulse interference and the buffer is cleared, and the system does not output in this case. This strategy effectively filters out random noise while completely preserving the transient data at the initial stage of the real signal establishment, avoiding truncation of the signal start segment.

[0119] To verify the effectiveness of the proposed method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement, this embodiment constructs multiple sets of comparative simulation experiments based on the MATLAB simulation platform. The system sampling rate is set to 10kHz, and Gaussian white noise with a standard deviation of 0.1 is superimposed to simulate the actual power grid environment.

[0120] First, an integer harmonic frequency signal model containing the fundamental frequency, second harmonic, and third harmonic was constructed to simulate ideal operating conditions where the system experiences symmetrical faults or contains only characteristic harmonics. The specific parameters are set as follows:

[0121] Fundamental component: frequency 50Hz, amplitude 22.0V, initial phase 0°;

[0122] Second harmonic: frequency 100Hz, amplitude 8.00V, initial phase -45°;

[0123] Third harmonic: frequency 150Hz, amplitude 3.5V, initial phase 90°

[0124] Figure 6 This demonstrates the method's ability to extract these harmonics, where (a) shows the frequency parameter extraction trajectory, (b) shows the amplitude parameter extraction trajectory, and (c) shows the phase parameter extraction trajectory. In each sub-figure, blue dots represent the 150Hz third harmonic parameter extracted by the method, purple dots represent the 100Hz second harmonic parameter extracted by the method, yellow dots represent the 50Hz fundamental frequency parameter extracted by the method, and green dashed lines represent the actual values ​​of the set parameters. Combined with... Figure 6 As can be seen, thanks to the adaptive combination of the harmonic sampling window and the rectangular window in this invention, the algorithm outputs stable frequency, amplitude and phase results at 0.02s. Because the signal satisfies the orthogonality condition, the rectangular window completely eliminates spectral leakage, verifying that this method has a millisecond-level fast response capability when processing integer harmonics.

[0125] Secondly, a complex synthetic signal containing the fundamental frequency, characteristic interharmonics, and non-characteristic interharmonics was constructed to simulate the real asynchronous oscillation condition under a high proportion of new energy access. The specific parameters of the synthetic signal are set as follows:

[0126] Fundamental component: frequency 50Hz, amplitude 22.0V, initial phase 0°;

[0127] Characteristic interharmonics: frequency 80Hz, amplitude 8.00V, initial phase -45°;

[0128] Non-characteristic interharmonics: frequency 137Hz, amplitude 3.5V, initial phase 90°.

[0129] Figure 7 The extraction results using only the interharmonic precise extraction window are shown, where (a), (b), and (c) correspond to the extraction trajectories of frequency, amplitude, and phase parameters for each harmonic component, respectively. In each sub-figure, blue dots represent the 137Hz non-characteristic interharmonic parameters extracted by this method, purple dots represent the 80Hz characteristic interharmonic parameters extracted by this method, yellow dots represent the 50Hz fundamental component parameters extracted by this method, and green dashed lines represent the actual values ​​of the set parameters. Combined with... Figure 7As can be seen, this method cannot perform an effective FFT transformation during the long period of 0-1 seconds due to insufficient data, resulting in all outputs of frequency, amplitude, and phase being 0. The data only undergoes a step change after 1 second, indicating a 1-second data buffer period. Although this method has high accuracy, it has an inherent deficiency in terms of speed.

[0130] Figure 8 The extraction results of this invention are shown, where (a), (b), and (c) correspond to the extraction trajectories of frequency parameters, amplitude parameters, and phase parameters for each harmonic component, respectively. Combining the dynamic evolution process of these three sub-figures, it can be seen that within 0-0.1s, the octet harmonic sampling window can quickly lock onto the 50Hz fundamental frequency. However, due to insufficient frequency resolution, the 80Hz and 137Hz interharmonics cannot be extracted quickly. With smooth window switching, after 0.1s, the interharmonic extraction results converge rapidly. After 1s, the precise interharmonic extraction window improves the extraction accuracy of all frequency components to a high level. Figure 8 The parameter curves in (a), (b), and (c) all exhibit almost perfect straight lines, thus verifying that the present invention can achieve the best balance between speed and accuracy.

[0131] In summary, this invention effectively solves the engineering contradiction of "inaccuracy" and "slowness" in broadband power grid harmonic extraction by multi-scale collaboration at the algorithm level without increasing hardware costs.

[0132] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.

Claims

1. A method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement, characterized in that, Includes the following steps: S1, construct a multi-resolution parallel data buffer, including three types of windows: harmonic sampling window, interharmonic fast extraction window, and interharmonic precise extraction window, to discretize the acquired signal, and set three types of windows for transient capture, transition tracking and steady-state measurement of the signal respectively. S2, based on the current system runtime, uses a smooth transition function to dynamically calculate the confidence weight of each window, thereby achieving smooth switching between different resolution modes; S3, for the signal segments within each window, adaptively selects the window function type for weighted truncation, uses zero-padding fast Fourier transform and full-band peak search to obtain spectral parameters, and introduces a phase alignment algorithm based on time zero point to eliminate phase drift caused by asynchronous sampling, and obtains accurate single-window parameters, including frequency, amplitude and phase. S4. Based on the dynamically calculated confidence weights, the amplitude, frequency, and phase output of each window are fused using a multi-scale collaborative method to obtain the preliminary parameters after fusion. S5 performs stability filtering on the fused preliminary parameters based on historical trajectory backtracking. It only determines the parameters as valid and outputs them when the parameters are continuously and stably present, thus achieving highly reliable measurement with noise resistance. In step S2, the smooth transition function adopts an S-shaped cosine transition function. The mathematical expression is: (2) in, This is the current system uptime. For the transition start time, This is the end time of the transition; In step S2, the process of dynamically calculating the confidence weights of each window is as follows: The weight of the interharmonic precise extraction window is directly determined by the S-shaped cosine transition function centered at the moment when the window data is filled; the weight of the interharmonic fast extraction window is activated by the S-shaped cosine transition function at the moment when the data is filled, but it decreases proportionally as the weight of the interharmonic precise extraction window increases; the weight of the harmonic sampling window is used to fill the remaining space to ensure that the sum of the weights of the three windows is always 1. In step S3, the process of adaptively selecting the window function type is as follows: When the target frequency is an integer multiple of the power frequency and is within the harmonic sampling window, a rectangular window is automatically switched to utilize orthogonality for rapid extraction. When the target frequency is an interharmonic or is in another window, a Blackman window is used to suppress spectral leakage. In step S4, the multi-scale collaborative fusion process is as follows: For amplitude and frequency, the estimated values ​​of each window are multiplied by their corresponding confidence weights and then summed for a linear weighted average. For phase, the confidence weights of each window are compared, and the phase estimate corresponding to the window with the largest weight is directly selected as the output. In step S5, the stability filtering process is as follows: Before confirming the validity of the initial parameters after fusion, the initial parameters are temporarily stored in the data buffer. When the number of frames in which the parameters exist continuously and stably reaches the threshold, the temporarily stored data is output all at once and the real-time output mode is switched. If the threshold is not reached, it is judged as noise interference and the data in the data buffer is discarded.

2. The method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement according to claim 1, characterized in that, In step S1, the three types of windows are set as follows: The resolution of the harmonic sampling window is 50Hz, the resolution of the interharmonic fast extraction window is 10Hz, and the resolution of the interharmonic precise extraction window is 1Hz.

3. The method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement according to claim 2, characterized in that, Duration of the harmonic sampling window =20ms, duration of the interharmonic fast extraction window =100ms, duration of the precise interharmonic extraction window =1s.

4. The method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement according to claim 3, characterized in that, Interharmonic precise extraction window weights for: (5) in, This indicates the accurate extraction window coefficients for interharmonics. ; Interharmonic fast extraction window weights for: (6) in, This indicates the rapid extraction of window coefficients for interharmonics. ; Harmonic sampling window weights for: (7)。 5. The method for rapid extraction of broadband power grid harmonics based on multi-scale collaborative measurement according to claim 4, characterized in that, The threshold is 5 frames during the stability filtering process.