Multi-factor coupling dynamic error compensation method, system and device and storage medium
By combining time-frequency analysis and harmonic analysis with Lagrange interpolation reconstruction, the accuracy and timeliness issues of power metering error compensation under new energy grid integration are solved, thereby improving the real-time performance and reliability of power metering. This method is applicable to smart grids and energy management systems.
Patent Information
- Application Number
- CN202510858686.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2025-11-18
AI Technical Summary
Existing power metering error compensation methods suffer from insufficient compensation accuracy and poor timeliness in new energy access scenarios due to the lack of coupling processing of frequency drift, transient distortion, and phase and harmonic errors. This makes it difficult to meet the real-time compensation requirements for high-frequency dynamic errors in smart grid and new energy scenarios.
By employing time-frequency analysis, feature extraction, Lagrange interpolation reconstruction, and harmonic analysis, a multi-factor coupled dynamic error compensation method is constructed to obtain the instantaneous frequency trajectory and phase information of the signal, calculate the dynamic compensation amount, and correct the power metering value.
It improves the accuracy and reliability of electricity metering in new energy grid-connected scenarios, enhances the credibility of grid operation data and the fairness of financial settlement, and has the advantages of strong real-time performance, clear structure and adjustable parameters. It is suitable for smart meters and energy management systems.
Smart Images

Figure CN120978709A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of new energy grid-connected control technology, and in particular to a multi-factor coupled dynamic error compensation method, system, device and storage medium. Background Technology
[0002] With the rapid development of new energy technologies, the penetration rate of renewable energy sources such as wind power and photovoltaic power in the power grid is constantly increasing, promoting the construction of a new power system characterized by the coordinated interaction of "source-grid-load-storage". However, compared with traditional thermal power units, new energy power sources generally have characteristics such as large output fluctuations, weak power control capabilities, and high harmonic content. In actual grid connection, these can easily cause short-term disturbances in voltage and current, frequency drift, and waveform distortion, which seriously affect the accuracy and consistency of metering data. To ensure the fairness of metering and the accuracy of settlement between the user side and the operator side, it is urgent to build an energy error compensation mechanism with dynamic response capabilities to improve the robustness and adaptability of the energy metering system in new energy grid connection scenarios.
[0003] In existing technologies, compensation methods for electricity metering errors are mostly based on steady-state modeling or fixed-frequency harmonic analysis. These methods typically assume the grid signal is stationary and rely on fixed sampling rates and static models for data processing, making it difficult to address frequency drift and transient distortions caused by renewable energy integration. Furthermore, traditional methods often treat phase errors and harmonic errors separately, neglecting their dynamic coupling relationship. This results in insufficient accuracy and timeliness of the error compensation model, failing to meet the practical needs of real-time compensation for high-frequency dynamic errors in smart grid and renewable energy scenarios. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides a multi-factor coupled dynamic error compensation method, system, device, and storage medium to solve the problems of insufficient compensation accuracy and poor timeliness caused by the lack of coupled processing of frequency drift, transient distortion, and phase and harmonic errors in existing power metering error compensation methods in new energy access scenarios.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides a multi-factor coupled dynamic error compensation method, comprising:
[0008] Obtain the original signal sequence, perform time-frequency analysis on the original signal sequence, and obtain the time-frequency matrix;
[0009] Feature extraction is performed on the time-frequency matrix to obtain feature information;
[0010] Based on the aforementioned feature information, the Lagrange interpolation reference node at the corresponding time point is calculated to reconstruct the signal and obtain the synchronous sampling sequence.
[0011] Harmonic analysis was performed on the synchronous sampling sequence to obtain harmonic parameters;
[0012] The dynamic compensation amount is calculated by combining the aforementioned feature information and the harmonic parameters, and the electricity metering value is corrected.
[0013] As a preferred embodiment of the multi-factor coupled dynamic error compensation method described in this invention, the time-frequency analysis of the original signal sequence includes:
[0014] A sliding window is constructed from the original signal sequence according to a fixed sliding window length and overlap ratio to obtain a time-series data block;
[0015] Apply a first window function to each data block, and perform a first signal transformation method on each windowed data block to obtain multiple local complex spectra;
[0016] Multiple local complex spectra are spliced together to obtain a time-frequency matrix.
[0017] As a preferred embodiment of the multi-factor coupled dynamic error compensation method described in this invention, the feature extraction of the time-frequency matrix includes:
[0018] By analyzing the frequency band where the fundamental frequency is located in the time-frequency matrix, the main ridge line of the frequency distribution over time is obtained, which constitutes the instantaneous frequency trajectory.
[0019] Based on the dominant frequency phase spectrum in the time-frequency matrix, the fundamental component phase under continuous time slices is extracted to construct the instantaneous phase sequence of the fundamental component.
[0020] The instantaneous frequency trajectory and instantaneous phase sequence are preprocessed to obtain the characteristic information of frequency and phase.
[0021] The beneficial effects of this preferred technical solution are that by extracting the instantaneous frequency trajectory and phase sequence through time-frequency matrix analysis, and obtaining accurate frequency and phase characteristic information after preprocessing, it provides a reliable basis for subsequent error compensation and improves the accuracy and reliability of power metering.
[0022] As a preferred embodiment of the multi-factor coupled dynamic error compensation method described in this invention, the synchronous sampling sequence includes:
[0023] Based on the instantaneous frequency trajectory, the Lagrange interpolation reference node at the corresponding time point is calculated for the first time.
[0024] The interpolation support set is constructed by selecting the sampling points closest to the reference node;
[0025] The data points in the interpolation support set are reconstructed using Lagrange interpolation to obtain the synchronous sampling sequence;
[0026] The first phase correction method is applied to the sampled sequence to obtain the corrected synchronous sampled sequence.
[0027] The beneficial effect of this preferred technical solution is that by dynamically interpolating and reconstructing the synchronous sampling sequence and correcting the phase, the accuracy and continuity of the sampling sequence are ensured, thereby improving the accuracy of harmonic analysis.
[0028] As a preferred embodiment of the multi-factor coupled dynamic error compensation method described in this invention, the harmonic analysis of the synchronous sampling sequence includes:
[0029] A second signal transformation method is applied to the corrected synchronous sampling sequence to extract the first harmonic component;
[0030] The harmonic parameters of each order are calculated based on the amplitude and phase spectrum of the first harmonic component, thus obtaining the harmonic parameter set;
[0031] The harmonic parameter set is subjected to time-series smoothing to obtain the processed harmonic parameters.
[0032] The beneficial effect of this preferred technical solution is that by extracting and smoothing harmonic parameters through harmonic analysis, the dynamic characteristics of the signal can be accurately reflected, providing reliable data support for error compensation.
[0033] As a preferred embodiment of the multi-factor coupled dynamic error compensation method described in this invention, the calculation of the dynamic compensation amount includes:
[0034] An error calculation model is constructed based on the instantaneous phase of the fundamental component and the processed harmonic parameters. The composite dynamic error value is output by combining the phase deviation and harmonic distortion rate.
[0035] A compensation function is constructed based on the composite dynamic error value to generate the compensation amount;
[0036] The compensation amount is added to the original electricity metering result to obtain the corrected electricity metering value.
[0037] As a preferred embodiment of the multi-factor coupled dynamic error compensation method described in this invention, the composite dynamic error value and compensation amount include:
[0038] The composite dynamic error value is the sum of the empirical fitting weight coefficient multiplied by the sine of the instantaneous phase of the fundamental component, plus the product of the amplitudes of the second to Nth harmonics and the empirical fitting weight coefficients, and then multiplied by the cosine of the initial phase of the kth harmonic.
[0039] The compensation amount is the difference between the uncompensated original electrical energy metering value and the dynamic error value.
[0040] Secondly, the present invention provides a multi-factor coupled dynamic error compensation system, comprising:
[0041] The time-frequency analysis module is used to acquire the original signal sequence, perform time-frequency analysis on the original signal sequence, and obtain a time-frequency matrix;
[0042] The feature extraction module is used to extract features from the time-frequency matrix to obtain feature information;
[0043] The reconstruction module is used to calculate the Lagrange interpolation reference node at the corresponding time point based on the feature information to reconstruct the signal and obtain the synchronous sampling sequence;
[0044] The harmonic analysis module is used to perform harmonic analysis on the synchronous sampling sequence to obtain harmonic parameters;
[0045] The correction module is used to calculate the dynamic compensation amount by combining the feature information and the harmonic parameters, and to correct the power metering value.
[0046] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, characterized in that the processor executes the computer program to implement the steps of the multi-factor coupled dynamic error compensation method.
[0047] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, characterized in that the computer program, when executed by a processor, implements the steps of the multi-factor coupled dynamic error compensation method.
[0048] Compared with existing technologies, the beneficial effects of this invention are as follows: By constructing a signal processing flow that includes real-time signal acquisition, short-time Fourier transform analysis, and instantaneous frequency-phase extraction, the system can accurately capture the short-time disturbances and non-steady-state characteristics of voltage and current signals caused by new energy access. It is particularly suitable for scenarios with strong volatility and rich harmonics, such as photovoltaic and wind power, effectively avoiding error propagation and measurement deviations under traditional fixed-frequency sampling methods. Based on the dynamic generation of Lagrange interpolation nodes and reconstruction of synchronous sampling sequences based on instantaneous frequency trajectories, combined with the extraction of higher-order harmonic parameters and the construction of transformation matrices, this invention establishes a multi-order harmonic and fundamental phase... The composite error model driven by multiple factors can meticulously characterize the systematic impact of nonlinear distortion on power measurement during the grid connection of new energy sources, thereby achieving time-continuous error compensation and exhibiting good generalization and scalability. Combined with the constructed composite dynamic error function and power correction model, the dynamic error compensation computation mechanism proposed in this invention has advantages such as strong real-time performance, clear structure, and adjustable parameters. It can be seamlessly embedded into existing smart meters and energy management systems to achieve online correction of real-time power measurement results, enhance the reliability of grid operation data and the fairness of financial settlement, and has significant engineering application value. Attached Figure Description
[0049] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0050] Figure 1 This is a schematic diagram of the overall process logic of a multi-factor coupled dynamic error compensation method provided in one embodiment of the present invention. Detailed Implementation
[0051] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, and not all of them. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of the present invention.
[0052] Example 1, referring to Figure 1 As an embodiment of the present invention, a multi-factor coupled dynamic error compensation method is provided, comprising:
[0053] S100: Obtain the original signal sequence, perform time-frequency analysis on the original signal sequence, and obtain the time-frequency matrix;
[0054] S200: Extract features from the time-frequency matrix to obtain feature information;
[0055] S300: Based on the characteristic information, calculate the Lagrange interpolation reference node at the corresponding time point to reconstruct the signal and obtain the synchronous sampling sequence;
[0056] S400: Perform harmonic analysis on the synchronous sampling sequence to obtain harmonic parameters;
[0057] S500: Combines characteristic information and harmonic parameters to calculate dynamic compensation and correct the electricity metering value.
[0058] It should be noted that by using time-frequency analysis, feature extraction, signal reconstruction, and harmonic analysis, the system accurately captures the dynamic characteristics of signals under new energy grid connection, calculates dynamic compensation to correct the electricity metering value, significantly improves metering accuracy and real-time performance, enhances the reliability of grid data and the fairness of settlement, and adapts to the needs of complex power environments.
[0059] In this embodiment of the invention, step S100 includes the following sub-steps A1-A3;
[0060] In A1: A sliding window is constructed on the original signal sequence according to a fixed sliding window length and overlap ratio to obtain a time-series data block;
[0061] In A2: Apply the first window function to each data block, and perform the first signal transformation method on each windowed data block to obtain multiple local complex spectra;
[0062] In A3: Multiple local complex spectra are spliced together to obtain a time-frequency matrix.
[0063] In this embodiment of the invention, a high-precision synchronous sampling device is used to access the voltage channel and the current channel respectively to obtain the analog waveforms of the grid voltage signal and the current signal. The analog waveforms are digitally sampled using an analog-to-digital conversion module to generate an original signal sequence that matches the time axis. The sampled voltage signal sequence and current signal sequence are subjected to noise filtering to remove high-frequency noise interference and spike anomalies. The filtered signal is then normalized in amplitude and bound to a time tag to form an original signal sequence that can be used for subsequent time-frequency analysis.
[0064] Specifically, the analog-to-digital converter (ADC) module is used to digitally sample the analog waveform. The system controller sends a clock signal at a preset sampling rate (e.g., 20kHz to 200kHz) to drive the ADC module to periodically sample the input analog waveform. During each clock cycle, the sample-and-hold circuit temporarily stores the current analog voltage / current signal value as a constant level. The ADC module receives the held level and performs analog-to-digital conversion, converting the analog value into a digital code according to a set resolution (e.g., 12-bit or 16-bit). Each sampled value is bound to its sampling timestamp to generate a raw voltage / current signal sequence with complete time-domain information.
[0065] It should be noted that by standardizing the acquisition path and preprocessing process, the obtained raw signal sequence can be ensured to meet the requirements of dynamic analysis in terms of temporal consistency and waveform clarity.
[0066] In one alternative embodiment, the first window function can be a Hanning window function, and for each sampling point (the range of sampling points is 0 to N-1, where N is the length of the window), the value of the window function is obtained by subtracting the cosine of 0.5 multiplied by the ratio of the sampling point to the window length minus 1.
[0067] In an alternative embodiment, the first window function can be a Blackman window. For each sampling point (the range of sampling points is 0 to N-1, where N is the length of the window), the value of the window function is 0.42 minus 0.5 multiplied by the cosine of the ratio of the sampling point to the window length minus 1, and then 0.08 multiplied by twice the cosine of the ratio of the sampling point to the window length minus 1.
[0068] In this embodiment of the invention, the first window function includes a Hamming window function;
[0069] Specifically, a sliding window is constructed from the original signal sequence according to a fixed sliding window length and overlap ratio to form a time-series data block. The sliding window length is set to 512 points and the overlap ratio is set to 75%.
[0070] Applying a Hamming window function to each data block improves the resolution of the spectrum estimation and suppresses sidelobe leakage;
[0071] The Hamming window function is expressed as:
[0072]
[0073] Where w(n) is the weight of the window function at the nth sampling point, N is the window length (set to 512), and n is the sample number within the window, ranging from 0 to N-1;
[0074] The first signal transformation method is applied to each windowed data block to generate a local complex spectrum. Multiple local complex spectra are then concatenated in time order to output a two-dimensional time-frequency matrix.
[0075] In one alternative embodiment, the first signal transformation method can be wavelet transform, which uses wavelet functions as basis functions to perform multi-scale localization analysis of the signal by changing the scale parameters and translation parameters.
[0076] In one optional embodiment, the first signal transformation method can be the Wigner-Ville distribution, calculating the autocorrelation function of the signal, and performing a Fourier transform on the autocorrelation function to obtain the time-frequency distribution of the signal at time and frequency.
[0077] In this embodiment of the invention, the first signal transformation method includes short-time Fourier transform;
[0078] Specifically, for the input signal, a window function is selected to divide the signal into multiple local time-domain segments; a Fourier transform is performed on each time-domain segment to obtain the spectrum of the signal in time and frequency.
[0079] It should be noted that using short-time Fourier transform to perform high-precision time-frequency mapping of the power grid signal provides a basic representation for subsequent extraction of transient change features.
[0080] In this embodiment of the invention, step S200 includes the following sub-steps B1-B3;
[0081] In B1: the frequency band containing the fundamental frequency in the time-frequency matrix is analyzed to obtain the instantaneous frequency trajectory formed by the main ridge line of the frequency distribution over time;
[0082] In B2: Based on the dominant frequency phase spectrum in the time-frequency matrix, the fundamental component phase under continuous time slices is extracted, and the instantaneous phase sequence of the fundamental component is constructed.
[0083] In B3: The instantaneous frequency trajectory and instantaneous phase sequence are preprocessed to obtain the characteristic information of frequency and phase.
[0084] In an optional embodiment, the first preprocessing can be a phase correction method, which calculates the phase difference between adjacent time points and adjusts the phase difference to eliminate phase jumps. This can effectively eliminate phase jumps caused by short-time window errors and maintain the continuity and stability of the phase.
[0085] In one optional embodiment, the first preprocessing can be a frequency tracking method, which uses a frequency tracking algorithm to track and estimate the frequency of the signal in real time to eliminate frequency disturbances. The frequency tracking algorithm can dynamically adjust the frequency estimate according to the time-frequency characteristics of the signal to adapt to the frequency changes of the signal.
[0086] In this embodiment of the invention, the first preprocessing includes a smoothing process;
[0087] Specifically, to suppress high-frequency jitter interference caused by the short-time Fourier transform window boundary effect, after extracting the instantaneous frequency trajectory and the instantaneous phase of the fundamental component, a moving average filtering operation needs to be performed on both. i The expression, after applying a three-point moving average smoothing process, is as follows:
[0088]
[0089] Where, f(t) i ) represents the time point t i The instantaneous frequency value at point f(t) i-1 ) represents the time point t i The instantaneous frequency value at -1, f(t) i+1 At time point t i The instantaneous frequency value at +1;
[0090] It should be noted that for the fundamental instantaneous phase sequence {φ(t)} i Linear interpolation smoothing is performed to eliminate phase jumps and ensure that the phase changes continuously over time. By synchronously extracting frequency and phase features, a dynamic characteristic description of the power grid fundamental wave is established, laying a physical foundation for interpolation and error modeling.
[0091] In this embodiment of the invention, step S300 includes the following sub-steps C1-C4;
[0092] In C1: Based on the instantaneous frequency trajectory, the Lagrange interpolation reference node at the corresponding time point is calculated for the first time.
[0093] In C2: Select the sampling point closest to the reference node to construct the interpolation support set;
[0094] In C3: Lagrange interpolation is used to reconstruct the data points in the interpolation support set to obtain the synchronous sampling sequence;
[0095] In C4: The first phase correction method is applied to the sampled sequence to obtain the corrected synchronous sampled sequence.
[0096] In one optional embodiment, the first phase correction method can be phase unfolding, calculating the phase difference between adjacent time points, subtracting 2π if the phase difference exceeds π, and adding 2π if the phase difference is less than -π, accumulating the adjusted phase differences to obtain a continuous phase sequence.
[0097] In one optional embodiment, the first phase correction method can be a Kalman filter, which predicts the state at the next time point based on the current state and the system model, updates the state estimate based on the difference between the actual measured value and the predicted value, calculates the prediction error and the update error, and adjusts the filter parameters.
[0098] In this embodiment of the invention, the first phase correction method includes verifying the phase continuity of the reconstructed sampling sequence;
[0099] Specifically, based on the extracted instantaneous frequency trajectory, the Lagrange interpolation reference node for the corresponding time point is calculated, and the instantaneous frequency trajectory is obtained. Then, calculate t at each time point. i Interpolation reference node x at i Represented as:
[0100]
[0101] Where x0 is the interpolation start node. For time t j The smoothing frequency, Δt is the sampling interval, x i To reconstruct the ideal equal-frequency sampling point position corresponding to the i-th target node in the sequence;
[0102] The sampling points closest to the reference node are selected to construct the interpolation support set. The data points in the support set are reconstructed using the second-order Lagrange interpolation formula to obtain a smooth synchronous sampling sequence.
[0103] Using the three-point Lagrange interpolation formula, the original non-uniformly sampled data is synchronously sampled and reconstructed. Let the original sequence be (x0, y0), (x1, y1), (x2, y2), then the value corresponding to any interpolation point x is:
[0104]
[0105] Where x is the required equal-frequency resampling point, and y(x) is the interpolation reconstruction result;
[0106] The phase continuity of the reconstructed sampling sequence is verified to ensure that interpolation does not introduce phase abrupt changes. The fundamental phase sequence φ is then extracted from the reconstructed sequence. recon (t i ); Calculate the phase increment Δφ between adjacent time points. i =φ recon (t i+1 )-φ recon (t i If a mutation exists (such as |Δφ) i If |>π), then perform phase expansion correction:
[0107] φ corrected (t i+1 )=φ recon (t i+1 ±2π
[0108] Where, φ recon (ti+1 ) is at time t i+1 The fundamental phase sequence is obtained, and the corrected sequence is used for subsequent harmonic analysis.
[0109] It should be noted that by dynamically constructing the Lagrange interpolation structure, time alignment of non-uniform sampling and reconstruction of power grid signal waveforms are achieved, thereby improving the accuracy of subsequent harmonic analysis.
[0110] In this embodiment of the invention, step S400 includes the following sub-steps D1-D3;
[0111] In D1: The corrected synchronous sampling sequence is subjected to a second signal transformation method to extract the first harmonic component;
[0112] In D2: The harmonic parameters of each order are calculated based on the amplitude and phase spectrum of the first harmonic component to obtain the harmonic parameter set;
[0113] In D3: The harmonic parameter set is time-smoothed to obtain the processed harmonic parameters.
[0114] In one optional embodiment, the second signal transformation method can be discrete cosine transform, taking the corrected synchronous sampling sequence as the input signal, applying discrete cosine transform to the input signal to transform the signal from the time domain to the frequency domain. In the frequency domain, the output of discrete cosine transform is a series of coefficients. By analyzing the coefficients, the main frequency and harmonic components are extracted, and the amplitude and initial phase of each order harmonic are calculated based on the discrete cosine transform coefficients.
[0115] In one optional embodiment, the second signal transformation method can be discrete wavelet transform. The corrected synchronous sampling sequence is used as the input signal. Discrete wavelet transform is applied to the input signal to decompose the signal into wavelet coefficients at different scales and time positions. In the wavelet domain, the output of discrete wavelet transform is a series of wavelet coefficients. By analyzing the coefficients, the dominant frequency and harmonic components are extracted. Based on the discrete wavelet transform coefficients, the amplitude and initial phase of each harmonic are calculated.
[0116] In this embodiment of the invention, the second signal transformation method includes Fast Fourier Transform;
[0117] Specifically, a fast Fourier transform is applied to the synchronous sampling sequence to extract the first harmonic component, including the dominant frequency, odd harmonic components, and even harmonic components.
[0118] The amplitude, initial phase, and frequency offset of each harmonic are calculated based on the amplitude and phase spectra to form a dynamic harmonic parameter set. After performing a fast Fourier transform on the synchronously sampled sequence x(t), the complex spectrum X(f) is obtained. k ), where each harmonic component parameter is represented as:
[0119] The amplitude of the kth harmonic:
[0120]
[0121] Initial phase:
[0122] θ k =arg(X(f) k ))
[0123] Frequency offset (deviation from the ideal fundamental frequency f1):
[0124] Δf k =f k -k·f1
[0125] Where N is the number of FFT points, X(f k f1 is the complex number at the k-th point in the frequency domain, and f1 is the instantaneous fundamental frequency.
[0126] Perform timing smoothing on the harmonic parameter set to eliminate jump interference caused by window function boundaries, and perform timing smoothing on the amplitude and phase sequence {A} of each harmonic. k (t i ),θ k (t i The moving average with length M=5 is expressed as follows:
[0127]
[0128] If the parameter changes at two consecutive points exceed the set threshold (e.g., phase jump > 30°), the previous smoothed value is used to suppress local spikes.
[0129] The harmonic parameters of each order are arranged along the time axis to construct a dynamic harmonic variation matrix.
[0130] It should be noted that the extraction and modeling of non-fundamental components in the power grid signal is achieved, ensuring full-frequency coverage of compensation calculation. Harmonic components are extracted through Fast Fourier Transform and time-series smoothing is performed to effectively eliminate window function boundary interference, improve the accuracy and stability of harmonic parameters, and provide reliable data for error compensation.
[0131] In this embodiment of the invention, step S500 includes the following sub-steps E1-E3;
[0132] In E1: An error calculation model is constructed based on the instantaneous phase of the fundamental component and the processed harmonic parameters. The composite dynamic error value is output by combining the phase deviation and harmonic distortion rate.
[0133] In E2: A compensation function is constructed based on the composite dynamic error value to generate the compensation amount;
[0134] In E3: The compensation amount is added to the original energy metering result to obtain the corrected energy metering value;
[0135] In E4: The composite dynamic error value is the sum of the empirical fitting weight coefficient multiplied by the sine of the instantaneous phase of the fundamental component, plus the product of the amplitudes of the second to Nth harmonics and the empirical fitting weight coefficients, and then multiplied by the cosine of the initial phase of the kth harmonic.
[0136] In E5: The compensation amount is the difference between the uncompensated original electrical energy metering value and the dynamic error value.
[0137] Specifically, the calculation model for the composite dynamic error value is expressed as follows:
[0138]
[0139] Where ΔE(t) is the composite dynamic error value at time t, φ(t) is the instantaneous phase of the fundamental component, and A k (t) and θ k (t) represents the amplitude and initial phase of the k-th harmonic at time t, respectively, and α, β k The weighting coefficients are empirically fitted to satisfy the least squares error criterion.
[0140] The dynamic compensation amount is expressed as: E corr (t)=E raw (t)-ΔE(t);
[0141] Among them, E corr (t) represents the corrected electricity metering value, E raw (t) represents the uncompensated original electrical energy metering value, and αE(t) represents the dynamic error value.
[0142] It should be noted that by establishing a dynamic error compensation mechanism by coupling phase and harmonic factors, the stability and accuracy of power metering in the scenario of new energy grid connection are improved. The calculation model of composite dynamic error value constructs a dynamic error estimation framework for coupled phase offset and multi-order harmonic disturbance, which is adapted to the power output fluctuation of new energy and complex grid conditions. By constructing a unified error correction structure, real-time response and high-precision compensation for multi-dimensional dynamic interference in the scenario of new energy grid connection are realized.
[0143] The above is a schematic scheme of a multi-factor coupled dynamic error compensation method according to this embodiment. It should be noted that the technical solution of this multi-factor coupled dynamic error compensation system and the technical solution of the multi-factor coupled dynamic error compensation method described above belong to the same concept. For details not described in detail in the technical solution of the multi-factor coupled dynamic error compensation system in this embodiment, please refer to the description of the technical solution of the multi-factor coupled dynamic error compensation method described above.
[0144] The multi-factor coupled dynamic error compensation system in this embodiment includes:
[0145] The time-frequency analysis module is used to acquire the original signal sequence, perform time-frequency analysis on the original signal sequence, and obtain a time-frequency matrix;
[0146] The feature extraction module is used to extract features from the time-frequency matrix to obtain feature information;
[0147] The reconstruction module is used to calculate the Lagrange interpolation reference node at the corresponding time point based on the feature information to reconstruct the signal and obtain the synchronous sampling sequence;
[0148] The harmonic analysis module is used to perform harmonic analysis on the synchronous sampling sequence to obtain harmonic parameters;
[0149] The correction module is used to calculate the dynamic compensation amount by combining the feature information and the harmonic parameters, and to correct the power metering value.
[0150] This embodiment also provides a computer device suitable for multi-factor coupled dynamic error compensation, including:
[0151] The system includes a memory and a processor. The memory stores computer-executable instructions, and the processor executes these instructions to implement a multi-factor coupled dynamic error compensation method as described in the above embodiments.
[0152] This embodiment also provides a storage medium on which a computer program is stored. When the program is executed by a processor, it implements a multi-factor coupled dynamic error compensation method as proposed in the above embodiment.
[0153] The storage medium proposed in this embodiment and the method for realizing multi-factor coupling dynamic error compensation proposed in the above embodiments belong to the same inventive concept. Technical details not described in detail in this embodiment can be found in the above embodiments, and this embodiment has the same beneficial effects as the above embodiments.
[0154] Based on the above description of the implementation methods, those skilled in the art can clearly understand that the present invention can be implemented using software and necessary general-purpose hardware, and of course, it can also be implemented using hardware. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as a computer floppy disk, read-only memory (ROM), random access memory (RAM), flash memory, hard disk, or optical disk, etc., including several instructions to cause a computing device (which may be a personal computer, server, or network device, etc.) to execute the methods of the various embodiments of the present invention.
[0155] Example 2, referring to Table 1, differs from the first example and provides a verification test of a multi-factor coupled dynamic error compensation method to verify and explain the technical effects used in this method.
[0156] MATLAB / Simulink was used as the simulation tool, which includes the Signal Processing Toolbox for signal processing. The power grid model constructed for the experiment was a complex signal containing a 50Hz fundamental frequency, third and fifth harmonics, and random frequency drift (range ±1.5Hz). To accurately capture the dynamic characteristics of the signal, a signal sampling rate of 20kHz was set, and the test duration was set to 2 seconds.
[0157] The dynamic error compensation method proposed in this invention is compared with the traditional FFT metering method. The power metering error rate (%), average error, and voltage distortion rate (THD) recognition accuracy are set as evaluation indicators. The results are shown in Table 1.
[0158] Table 1 Error Comparison Table
[0159]
[0160] As shown in Table 1, under operating condition A1, the power metering error rate, average error, and voltage distortion rate of the method of the present invention are all much lower than those of the traditional method. This indicates that under normal fundamental frequency and harmonic disturbance conditions, the method of the present invention can more accurately measure power and more accurately estimate THD and instantaneous frequency, which is significantly better than the traditional method.
[0161] Under operating condition A2, the power metering error rate, average error, and voltage distortion rate of the method of the present invention are all much lower than those of the traditional method. Therefore, under the complex operating conditions where the fundamental wave, frequency drift, and low-order harmonics work together, the method of the present invention can still maintain high metering accuracy and parameter estimation accuracy, while the error of the traditional method increases significantly.
[0162] Under operating condition A3, the power metering error rate, average error, and voltage distortion rate of the method of the present invention are still much lower than those of the traditional method. This indicates that under the bidirectional sudden change operating condition caused by rapid start-up and shutdown of photovoltaics, the method of the present invention can effectively cope with rapidly changing signals and maintain low metering error and parameter estimation error, while the performance of the traditional method is greatly reduced.
[0163] The method of this invention exhibits significant performance advantages under various complex operating conditions, enabling more accurate measurement of electrical energy and more precise estimation of THD and instantaneous frequency. This demonstrates that the method has good adaptability and robustness, and is particularly suitable for complex power environments under new energy grid connection conditions, effectively improving the accuracy and reliability of electrical energy measurement.
[0164] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A multi-factor coupled dynamic error compensation method, characterized in that, include: Obtain the original signal sequence, perform time-frequency analysis on the original signal sequence, and obtain the time-frequency matrix; Feature extraction is performed on the time-frequency matrix to obtain feature information; Based on the aforementioned feature information, the Lagrange interpolation reference node at the corresponding time point is calculated to reconstruct the signal and obtain the synchronous sampling sequence. Harmonic analysis was performed on the synchronous sampling sequence to obtain harmonic parameters; The dynamic compensation amount is calculated by combining the aforementioned feature information and the harmonic parameters, and the electricity metering value is corrected.
2. The multi-factor coupled dynamic error compensation method of claim 1, wherein, Time-frequency analysis of the original signal sequence includes: A sliding window is constructed on the original signal sequence according to a fixed sliding window length and overlap ratio to obtain a time-series data block; Apply a first window function to each data block, and perform a first signal transformation method on each windowed data block to obtain multiple local complex spectra; Multiple local complex spectra are spliced together to obtain a time-frequency matrix.
3. The multi-factor coupled dynamic error compensation method as described in claim 2, characterized in that, Feature extraction of the time-frequency matrix includes: By analyzing the frequency band where the fundamental frequency is located in the time-frequency matrix, the main ridge line of the frequency distribution over time is obtained, which constitutes the instantaneous frequency trajectory. Based on the dominant frequency phase spectrum in the time-frequency matrix, the fundamental component phase under continuous time slices is extracted to construct the instantaneous phase sequence of the fundamental component. The instantaneous frequency trajectory and instantaneous phase sequence are preprocessed to obtain the characteristic information of frequency and phase.
4. The multi-factor coupled dynamic error compensation method as described in claim 3, characterized in that, The synchronous sampling sequence includes: Based on the instantaneous frequency trajectory, the Lagrange interpolation reference node at the corresponding time point is calculated for the first time. The interpolation support set is constructed by selecting the sampling points closest to the reference node; The data points in the interpolation support set are reconstructed using Lagrange interpolation to obtain the synchronous sampling sequence; The first phase correction method is applied to the sampled sequence to obtain the corrected synchronous sampled sequence.
5. The multi-factor coupled dynamic error compensation method as described in claim 4, characterized in that, Harmonic analysis of the synchronous sampling sequence includes: A second signal transformation method is applied to the corrected synchronous sampling sequence to extract the first harmonic component; The harmonic parameters of each order are calculated based on the amplitude and phase spectrum of the first harmonic component, thus obtaining the harmonic parameter set; The harmonic parameter set is subjected to time-series smoothing to obtain the processed harmonic parameters.
6. A multi-factor coupled dynamic error compensation method as described in claim 3 or 5, characterized in that, The calculation of dynamic compensation includes: An error calculation model is constructed based on the instantaneous phase of the fundamental component and the processed harmonic parameters. The composite dynamic error value is output by combining the phase deviation and harmonic distortion rate. A compensation function is constructed based on the composite dynamic error value to generate the compensation amount; The compensation amount is added to the original electricity metering result to obtain the corrected electricity metering value.
7. The multi-factor coupled dynamic error compensation method as described in claim 6, characterized in that, The composite dynamic error value and compensation amount include: The composite dynamic error value is the sum of the empirical fitting weight coefficient multiplied by the sine of the instantaneous phase of the fundamental component, plus the product of the amplitudes of the second to Nth harmonics and the empirical fitting weight coefficients, and then multiplied by the cosine of the initial phase of the kth harmonic. The compensation amount is the difference between the uncompensated original electrical energy metering value and the dynamic error value.
8. A multi-factor coupled dynamic error compensation system, employing the multi-factor coupled dynamic error compensation method as described in any one of claims 1-7, characterized in that, include: The time-frequency analysis module is used to acquire the original signal sequence, perform time-frequency analysis on the original signal sequence, and obtain a time-frequency matrix; The feature extraction module is used to extract features from the time-frequency matrix to obtain feature information; The reconstruction module is used to calculate the Lagrange interpolation reference node at the corresponding time point based on the feature information to reconstruct the signal and obtain the synchronous sampling sequence; The harmonic analysis module is used to perform harmonic analysis on the synchronous sampling sequence to obtain harmonic parameters; The correction module is used to calculate the dynamic compensation amount by combining the feature information and the harmonic parameters, and to correct the power metering value.
9. A computer device, characterized in that, include: A memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the multi-factor coupled dynamic error compensation method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the steps of a multi-factor coupled dynamic error compensation method according to any one of claims 1 to 7.
Citation Information
Cited By
Metering error dynamic compensation method and system of intelligent measuring switch
CN121741616A
TMR current acquisition self-calibration error compensation method, device, equipment and medium
CN121831657A
An electric energy metering error detection method and system
CN122430777A