Method for improving accuracy of grid-connected data
Through time-varying wavelet transformation, VMD and LSTM, the problems of insufficient high-frequency noise suppression and low-frequency component prediction accuracy in grid-connected data are solved, and high-precision grid-connected data processing is achieved, which improves the operating safety of the power system and the efficiency of the smart grid.
Patent Information
- Application Number
- CN202510133316.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-06
- Publication Date
- 2025-05-30
AI Technical Summary
When processing grid-connected data, the high-frequency noise suppression and low-frequency component prediction accuracy in the prior art lead to low data accuracy, which affects the safety and efficiency of power grid operation.
Time-varying wavelet transform is used to decompose the preprocessed grid-connected data into high-frequency and low-frequency data, and high-frequency noise is removed through variational modal decomposition (VMD), and the future change amplitude of low-frequency data is predicted using a long and short-term memory network (LSTM), and error correction is performed. Finally, the high-frequency and error correction data are fused through a signal reconstruction algorithm to generate high-precision grid-connected data.
It significantly improves the accuracy and quality of grid-connected data, enhances the operating safety and stability of the power system, and improves the efficiency of the smart grid.
Smart Images

Figure CN120067551A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of smart grid data processing, and particularly to a method for improving the accuracy of grid-connected data. Background Art
[0002] In modern power systems, the accuracy of grid-connected data plays a crucial role in ensuring the safe and stable operation of the power grid, improving energy utilization efficiency, and optimizing resource allocation. With the development of smart grids and the progress of distributed generation technologies, more and more new energy sources are connected to traditional power grids, making the dynamic behavior of power systems more complex. Traditional grid-connected data processing methods mainly rely on static analysis or simple statistical models, which are unable to cope with the rapidly changing power market environment and the increasing data volume. In recent years, scholars have proposed a variety of advanced signal processing technologies and machine learning algorithms to improve the accuracy of grid-connected data, including but not limited to wavelet transform, empirical mode decomposition (EMD), variational mode decomposition (VMD), and long short-term memory network (LSTM). These technologies have improved the data processing effect to a certain extent, but there is still room for improvement in terms of real-time performance, adaptability, and prediction accuracy.
[0003] The main deficiencies of the existing technologies lie in their sensitivity to high-frequency noise and the error correction ability of low-frequency components. On the one hand, although traditional preprocessing steps such as moving average and smoothing can remove noise to a certain extent, they often cannot effectively distinguish useful information from interference signals, especially when dealing with non-stationary signals, it is easy to cause the loss of important feature information. On the other hand, for the prediction of low-frequency components, existing methods usually perform linear extrapolation based on historical data, making it difficult to capture potential non-linear trends and periodic changes, resulting in large deviations in prediction results. This not only affects the quality of subsequent decisions but also limits the further improvement of the operation efficiency of power systems. Summary of the Invention
[0004] In view of the above existing problems, the present invention is proposed.
[0005] Therefore, the present invention provides a method for improving the accuracy of grid-connected data, which solves the problems of insufficient high-frequency noise suppression and low prediction accuracy of low-frequency components in the prior art.
[0006] To solve the above technical problems, the present invention provides the following technical solutions:
[0007] In a first aspect, the present invention provides a method for improving the accuracy of grid-connected data, which includes collecting grid-connected data and preprocessing the grid-connected data; decomposing the preprocessed grid-connected data into high-frequency data and low-frequency data by using time-varying wavelet transform; decomposing the high-frequency data into modal components and residual components through VMD, removing the modal components containing high-frequency noise and retaining the residual components; predicting the future change amplitude of the low-frequency data by using LSTM, and correcting the error of the low-frequency data according to the prediction result; fusing the denoised high-frequency data and the error-corrected low-frequency data through a signal reconstruction algorithm to generate high-precision grid-connected data.
[0008] As a preferred embodiment of the method for improving the accuracy of grid-connected data according to the present invention, wherein: the grid-connected data includes voltage fluctuation amplitude, frequency offset, load change rate, power factor, active power, reactive power, and current change rate.
[0009] As a preferred embodiment of the method for improving the accuracy of grid-connected data according to the present invention, wherein: the specific steps of preprocessing the grid-connected data are as follows.
[0010] Adopt a moving average method to perform preliminary denoising processing on the collected grid-connected data.
[0011] Adopt an interpolation method to complement the missing data during the collection process.
[0012] Use a statistical method to detect and remove outliers in the data.
[0013] Perform smoothing processing on the grid-connected data through a sliding window.
[0014] As a preferred embodiment of the method for improving the accuracy of grid-connected data according to the present invention, wherein: the specific steps of decomposing the preprocessed grid-connected data into high-frequency data and low-frequency data by using time-varying wavelet transform are as follows.
[0015] Set a sliding window with a fixed length for the preprocessed grid-connected data, perform Fourier transform on the grid-connected data within each window, extract the local spectral features of the grid-connected data, and monitor the actual changes of the local spectral features in real time.
[0016] Extract the time-varying characteristics of the grid-connected data according to the actual changes of the local spectral features.
[0017] Select the mother wavelet function and the decomposition level according to the local spectral features and time-varying characteristics of the grid-connected data.
[0018] Based on the mother wavelet function and the decomposition level, adopt time-varying wavelet transform to decompose the grid-connected data layer by layer into high-frequency data and low-frequency data.
[0019] As a preferred solution of the method for improving the grid-connected data accuracy described in the present invention, wherein: the high-frequency data is decomposed into modal components and residual components by VMD, the modal components containing high-frequency noise are removed, and the residual components are retained. The specific steps are as follows:
[0020] Perform frequency-domain analysis on the high-frequency data through Fourier transform to extract the frequency characteristics of the high-frequency data;
[0021] Based on the frequency characteristics of the high-frequency data, VMD gradually decomposes the high-frequency data to extract modal components in different frequency ranges, adjusts the central frequencies of each modal component at the same time, and takes the undecomposed part as the residual component;
[0022] Perform spectral analysis on the modal components, calculate the spectral density, and predict the frequency concentration degree of the modal components according to the spectral density. The expression is:
[0023]
[0024] where C k represents the frequency concentration degree of the k-th modal component, f represents the frequency of the grid-connected data, f max represents the maximum frequency of the grid-connected data, f min represents the minimum frequency of the grid-connected data, S k (f) represents the power spectral density of the k-th modal component, and k represents the index variable of the modal component;
[0025] Define the frequency concentration degree threshold τ based on the statistical characteristics of the frequency concentration degree of the modal components in the historical grid-connected data;
[0026] When C k > τ, it is considered that the current modal component is high-frequency noise;
[0027] When C k ≤ τ, it is considered that the current modal component is a non-noise component;
[0028] Retain the non-noise components and the residual components to generate the denoised high-frequency data u 1 .
[0029] As a preferred solution of the method for improving the grid-connected data accuracy described in the present invention, wherein: the power spectral density of the modal component is obtained by performing Fourier transform on the modal component. The expression is:
[0030]
[0031] where x k (t) represents the time-domain signal of the k-th modal component, j is the imaginary unit, and t represents the current time.
[0032] As a preferred solution of the method for improving the grid - connected data accuracy described in the present invention, wherein: the future change amplitude of the low - frequency data is predicted by using LSTM, and the low - frequency data is corrected for errors according to the prediction result. The specific steps are as follows,
[0033] The low - frequency data is segmented into time windows of a fixed length by using the sliding window method;
[0034] Based on the time window of a fixed length, LSTM is used to capture the time correlation and potential periodic changes of the low - frequency data, and combined with the hidden state of LSTM, the non - linear activation function, and the sine function, the intensity of the low - frequency data at a future moment is predicted. The expression is:
[0035]
[0036] wherein, T(t + Δt) is the change amplitude of the low - frequency data at the future moment t + Δt, u(t o ) is the value of the low - frequency data at the historical moment t o , W i is the time - step weight coefficient, n is the time - window length, Δt is the time step, γ is the periodic trend adjustment coefficient, β is the periodic frequency adjustment coefficient, h t is the output value of the hidden layer of LSTM at the current moment t, u represents the value of the low - frequency data in the time series at the moment t, and i is the index variable of the time step;
[0037] Based on the change amplitude of the low - frequency data at the future moment t + Δt of the low - frequency data, the overall deviation and random fluctuation information in the historical data are used to correct the low - frequency data. The expression is:
[0038]
[0039] wherein, u 2 (t) represents the value of the low - frequency data at the moment t after error correction, u(t o ) represents the value of the low - frequency data at the historical moment t o , T(t o ) represents the change rate of the low - frequency data at the historical moment t o , α represents the mean error correction coefficient, β represents the root - mean - square error correction coefficient, and t o represents the time point of the o - th historical moment within the time window.
[0040] As a preferred solution of the method for improving the grid - connected data accuracy described in the present invention, wherein: the denoised high - frequency data and the error - corrected low - frequency data are fused through a signal reconstruction algorithm to generate high - precision grid - connected data. The specific steps are as follows,
[0041] Using the interpolation method, the denoised high-frequency data and the low-frequency data after error correction are synchronized on the time axis and fused through non-linear combination. The expression is as follows:
[0042]
[0043] where u 3 (t) represents the high-precision grid-connected data, and v 1 is the weight coefficient of the low-frequency data after error correction. u 1 (t) represents the value of the denoised high-frequency data at time t, and v 2 represents the weight coefficient of the denoised high-frequency data.
[0044] In a second aspect, the present invention provides a computer device, including a memory and a processor. The memory stores a computer program, wherein: when the computer program is executed by the processor, any step of the method for improving the accuracy of grid-connected data described in the first aspect of the present invention is implemented.
[0045] In a third aspect, the present invention provides a computer-readable storage medium, on which a computer program is stored, wherein: when the computer program is executed by the processor, any step of the method for improving the accuracy of grid-connected data described in the first aspect of the present invention is implemented.
[0046] The beneficial effects of the present invention are as follows: By using the time-varying wavelet transform, the preprocessed grid-connected data is decomposed into high-frequency and low-frequency data. The present invention realizes the fine stratification of non-stationary signals, ensures the retention of dynamic information, and provides a high-quality data basis for subsequent processing. Then, through the VMD technology, the high-frequency data is further decomposed and high-frequency noise is removed, accurately distinguishing and retaining the effective signal components, and improving the data clarity. The combination of these two methods with preprocessing and final signal reconstruction not only enhances the overall quality of the grid-connected data but also ensures the generation of high-precision data, thus significantly improving the safety and stability of the power system operation and the efficiency of the smart grid. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the description of the embodiments. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0048] Figure 1 It is a flowchart of the method for improving the accuracy of grid-connected data in Embodiment 1.
[0049] Figure 2Flowchart for removing modal components containing high-frequency noise and retaining residual components in Embodiment 1. Detailed implementation manners
[0050] To make the above objects, features, and advantages of the present invention more obvious and understandable, the following will describe the detailed implementation manners of the present invention with reference to the accompanying drawings of the specification.
[0051] In the following description, many specific details are set forth to fully understand the present invention. However, the present invention can also be implemented in other ways different from those described herein. Those skilled in the art can make similar generalizations without departing from the connotation of the present invention. Therefore, the present invention is not limited by the specific embodiments disclosed below.
[0052] Secondly, the so-called "one embodiment" or "embodiment" herein refers to a specific feature, structure, or characteristic that can be included in at least one implementation manner of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a separate or alternative embodiment that mutually excludes other embodiments.
[0053] Embodiment 1, referring to Figure 1 and Figure 2 , is the first embodiment of the present invention. This embodiment provides a method for improving the accuracy of grid-connected data, including the following steps:
[0054] S1: Collect grid-connected data and preprocess the grid-connected data.
[0055] S1.1: The grid-connected data includes voltage fluctuation amplitude, frequency offset, load change rate, power factor, active power, reactive power, and current change rate.
[0056] Furthermore, it is collected in real time through smart meters, sensor networks, and monitoring devices deployed in the power system. These devices can capture the instantaneous state of the power system with high frequency and high precision and transmit the data to the central processing system for further analysis and processing, ensuring the real-time and accuracy of the data.
[0057] S1.2: Use the moving average method to perform preliminary denoising on the collected grid-connected data;
[0058] For example, for the voltage fluctuation amplitude data collected every 5 minutes, the average value of each time point and the two time points before and after it is calculated to replace the original value, thereby reducing the influence of short-term fluctuations and making the data smoother.
[0059] S1.3: Use the interpolation method to fill in the missing data during the collection process;
[0060] For example, when it is found that the power factor data at a certain moment is missing, the linear interpolation method can be used to estimate and fill this gap by using the actual measurement values before and after this moment to ensure the integrity of the data sequence;
[0061] S1.4: Detect and eliminate outliers in the data using statistical methods;
[0062] For example, by applying the 3σ principle to the historical data of active power (that is, if a value deviates from the average by more than three standard deviations, it is considered an outlier), identify the extreme values outside the normal range and mark them as outliers for elimination or correction.
[0063] S1.5: Smooth the grid-connected data through a sliding window.
[0064] For example, set a sliding window with a length of 10 time points, and calculate the average of the current change rate data within the window in turn. As the window moves forward step by step, update the average value, and smooth the entire data sequence in this way to reduce the influence of random noise.
[0065] S2: Use time-varying wavelet transform to decompose the preprocessed grid-connected data into high-frequency data and low-frequency data.
[0066] S2.1: Set a sliding window with a fixed length for the preprocessed grid-connected data, perform Fourier transform on the grid-connected data within each window, extract the local spectral features of the grid-connected data, and monitor the actual changes of the local spectral features in real time;
[0067] Specifically: Set a sliding window with a fixed length (for example, 30 time points), and this window covers each part of the data sequence in turn. For the grid-connected data within each window, apply the fast Fourier transform (FFT) to convert the time-domain signal into a frequency-domain representation, so as to extract the local spectral features, such as the main frequency components and their intensities. By continuously moving the sliding window and repeating this process, the changes of these local spectral features can be monitored in real time, capturing the dynamic characteristics of the grid-connected data that change over time. This process not only helps to identify and separate the signal components in different frequency ranges, but also can timely detect abnormal or mutation situations, providing a solid foundation for subsequent precise analysis and processing.
[0068] S2.2: Extract the time-varying characteristics of the grid-connected data according to the actual changes of the local spectral features;
[0069] It should be noted that the time-varying characteristics of the grid-connected data include the attributes of parameters such as voltage fluctuation amplitude, frequency offset, and load change rate that change dynamically over time, reflecting the real-time behavior and characteristics of the power system under different times and operating states.
[0070] S2.3: Select the mother wavelet function and the decomposition level according to the local spectral characteristics and time-varying characteristics of the grid-connected data;
[0071] Specifically: First, set a sliding window with a fixed length (for example, containing 60 time points) to segment the grid-connected data. For the data within each window, apply the Fast Fourier Transform (FFT) to extract the local spectral characteristics, such as the main frequency components, energy distribution, and the changing trend over time. Suppose the analysis results show that there are significant low-frequency fluctuations and high-frequency noises in a certain segment of the grid-connected data during a specific time period. Based on these local spectral characteristics and time-varying characteristics, select the most suitable mother wavelet function. For example, if it is found that there are a large number of transient changes and non-stationary behaviors in the grid-connected data, the Morlet wavelet can be selected as the mother wavelet function because it has good localization ability in both the time-frequency domain and is suitable for capturing transient signals. For smoother data, the Db4 wavelet may be selected because its good orthogonality and compactness can provide better decomposition effects. Next, determine the decomposition level according to the complexity of the signal. For example, if the dynamic changes in the grid-connected data are relatively severe and the frequency range is wide, a higher decomposition level (such as 5 - 7 layers) can be selected to ensure that different frequency levels of information can be fully analyzed; conversely, for relatively simple and stationary data, a lower decomposition level (such as 3 - 4 layers) can be selected to avoid redundant calculations caused by over-decomposition.
[0072] S2.4: Based on the mother wavelet function and the decomposition level, adopt time-varying wavelet transform to decompose the grid-connected data layer by layer into high-frequency data and low-frequency data.
[0073] Specifically: Input the preprocessed grid-connected data into the TVWT algorithm and perform multi-resolution analysis step by step according to the set decomposition level. Each layer of decomposition will generate a set of high-frequency coefficients and a set of low-frequency coefficients. Among them, the high-frequency coefficients capture the transient changes and noise components in the data, while the low-frequency coefficients retain the main trend and long-term characteristics of the data. For example, assume that the Morlet wavelet is selected as the mother wavelet function and 5 layers of decomposition are set. In the first layer of decomposition, TVWT will separate the finest-grained high-frequency information according to the time-frequency localization characteristics of the Morlet wavelet, and at the same time generate a rough low-frequency approximation. As the decomposition level increases, the subsequent layers continue to further subdivide the low-frequency part generated by the previous layer, and each time the data at the current level is divided into new high-frequency and low-frequency components. Finally, after the fifth layer of decomposition, a series of high-frequency data at different resolutions and a low-frequency data representing the overall trend will be obtained.
[0074] S3: Decompose the high-frequency data into modal components and residual components through VMD, remove the modal components containing high-frequency noises, and retain the residual components.
[0075] It should be noted that the VMD algorithm dynamically adjusts the center frequencies and bandwidths of each modal component, gradually decomposes the high-frequency data into several modal components with different frequency ranges, and simultaneously generates a residual component containing unallocated signals. Then, spectral analysis is performed on each modal component to calculate its spectral density and evaluate the frequency concentration. According to a preset threshold, the modal components containing high-frequency noise are identified and removed, and the effective signals and residual components with frequency concentration below the threshold are retained, thereby achieving precise denoising of high-frequency data.
[0076] S3.1: Perform frequency-domain analysis on the high-frequency data through Fourier transform to extract the frequency characteristics of the high-frequency data.
[0077] It should be noted that the frequency characteristics include the frequency range, the main frequency components, and their energy distribution characteristics.
[0078] S3.2: Based on the frequency characteristics of the high-frequency data, VMD gradually decomposes the high-frequency data, extracts the modal components in different frequency ranges, adjusts the center frequencies of each modal component simultaneously, and takes the undecomposed part as the residual component.
[0079] Specifically: According to the frequency-domain analysis results of the high-frequency data, such as the frequency range and the energy distribution characteristics of the main frequency components, VMD adaptively adjusts the center frequencies and bandwidths of each modal component to ensure that each modal component is concentrated in a specific frequency range and minimizes the frequency bandwidth to improve the decomposition accuracy. For example, assuming that the grid-connected data with large voltage fluctuation amplitude is being processed, it is found through Fourier transform that its high-frequency part contains multiple significant frequency peaks. VMD will gradually decompose these high-frequency components into several modal components, each corresponding to a narrow-band frequency interval, and continuously optimize the center frequencies of each modal component to make them as closely matched as possible to the actual frequency components in the original signal. Finally, the remaining information that cannot be assigned to any modal component is retained as the residual component, thereby achieving effective separation and purification of the high-frequency data.
[0080] S3.3: Perform spectral analysis on the modal components, calculate the spectral density, and predict the frequency concentration of the modal components according to the spectral density. The expression is:
[0081]
[0082] where C k represents the frequency concentration of the k-th modal component, f represents the frequency of the grid-connected data, f max represents the maximum frequency of the grid-connected data, f min represents the minimum frequency of the grid-connected data, S k (f) represents the power spectral density of the k-th modal component, and k represents the index variable of the modal component.
[0083] It should be noted that by performing spectral analysis on each modal component and calculating its spectral density, the frequency concentration degree of each modal component can be predicted. This process can accurately quantify the frequency distribution characteristics of each modal component, identify which modal components are mainly composed of high-frequency noise, and which contain useful signal components. Through this quantitative analysis, modal components with different characteristics can be effectively distinguished and processed, ensuring the accuracy and reliability of subsequent data processing.
[0084] S3.4: Define the frequency concentration threshold τ based on the statistical characteristics of the frequency concentration degree of modal components in historical grid-connected data;
[0085] When C k > τ, it is considered that the current modal component is high-frequency noise;
[0086] When C k ≤ τ, it is considered that the current modal component is a non-noise component;
[0087] For example, through statistics, it is found that the frequency concentration degree of modal components of effective signals mostly concentrates on lower values, while high-frequency noise shows a higher frequency concentration degree. Based on these statistical data, define a frequency concentration threshold τ, such as setting it to 100 Hz 2 , to distinguish useful signals and noise. The specific definition process is: conduct a summary analysis of the frequency concentration degrees of all historical modal components, find the obvious demarcation point between effective signals and noise, and set the threshold τ accordingly to ensure that high-frequency noise can be accurately identified and removed and effective signal components can be retained during the processing of new data.
[0088] S3.5: Retain the non-noise components and residual components to generate the denoised high-frequency data u 1 .
[0089] The power spectral density of the modal component is obtained by performing a Fourier transform on the modal component, and the expression is:
[0090]
[0091] where x k (t) represents the time-domain signal of the k-th modal component, j is the imaginary unit, and t represents the current time.
[0092] It should be noted that by performing a Fourier transform on the modal component, it can be transformed from the time domain to the frequency domain, thereby accurately revealing the energy distribution of each modal component at different frequencies. This process enables the clear identification and distinction of useful signal and noise components, especially suitable for processing complex and non-stationary grid-connected data. Frequency-domain analysis provides an in-depth understanding of the energy distribution of each frequency component, laying a foundation for subsequent noise removal and signal retention decisions, ensuring the accuracy and reliability of data analysis.
[0093] S4: Use LSTM to predict the future change amplitude of low-frequency data, and perform error correction on the low-frequency data according to the prediction results.
[0094] S4.1: Use the sliding window method to divide the low-frequency data into time windows of fixed length;
[0095] For example, assume that the low-frequency grid-connected data is collected once per minute. A sliding window containing 10 time points can be set, that is, the data segment analyzed each time covers a time range of 10 minutes. This window will slide along the entire data sequence in turn, moving forward one time point each time, thus generating a series of overlapping data segments. In this way, the low-frequency data within each time window can be analyzed independently, capturing local trends and features, while maintaining the continuity and correlation between data. This method not only helps to improve the accuracy of time series analysis, but also better reflects the dynamic changes of low-frequency data over time.
[0096] S4.2: Based on the time window of fixed length, use LSTM to capture the time correlation and potential periodic changes of low-frequency data, and combine the hidden state of LSTM, the non-linear activation function, and the sine function to predict the intensity of low-frequency data at future moments. The expression is:
[0097]
[0098] where, T(t + Δt) is the change amplitude of low-frequency data at future time t + Δt, u(t o ) is the value of low-frequency data at historical time t o , W i is the time step weight coefficient, n is the time window length, Δt is the time step, γ is the periodic trend adjustment coefficient, β is the periodic frequency adjustment coefficient, h t is the output value of the hidden layer of LSTM at the current time t, u represents the value of low-frequency data in the time series at time t, and i is the index variable of the time step;
[0099] It should be noted that based on the time window of fixed length, using LSTM to capture the time correlation and potential periodic changes of low-frequency data, and combining the hidden state of LSTM, the non-linear activation function, and the sine function, the intensity of low-frequency data at future moments can be accurately predicted. This method not only considers the change trend of historical data, but also effectively captures the possible periodic fluctuations by introducing the periodic adjustment factor, thus providing more accurate and reliable prediction results and significantly improving the ability to estimate the future change amplitude of low-frequency data.
[0100] S4.3: Based on the change amplitude of the low-frequency data at the future time t+Δt, the overall deviation and random fluctuation information in the statistical historical data are used to correct the low-frequency data. The expression is as follows:
[0101]
[0102] where u 2 (t) represents the low-frequency data value at time t after error correction, u(t o ) represents the low-frequency data value at the historical time t o , T(t o ) represents the change rate of the low-frequency data at the historical time t o , α represents the mean error correction coefficient, β represents the root mean square error correction coefficient, and t o represents the time point of the o-th historical moment within the time window.
[0103] It should be noted that using the predicted change amplitude T(t+Δt) at the future time t+Δt as the basis, two key correction terms are then introduced: one is the overall deviation based on historical data, by calculating the average difference between the actual value and the predicted value at the historical time t o and multiplying it by the mean error correction coefficient α to correct the deviation; the other is to consider the influence of random fluctuations, by calculating the root mean square of the difference between the actual value and the predicted value at the historical time and multiplying it by the root mean square error correction coefficient β to adjust the random error. The finally generated u 2 (t) is the low-frequency data value after these two corrections, which can more accurately reflect the actual situation and improve the reliability and accuracy of the prediction result.
[0104] S5: The denoised high-frequency data and the error-corrected low-frequency data are fused through a signal reconstruction algorithm to generate high-precision grid-connected data.
[0105] S5.1: Using the interpolation method, the denoised high-frequency data and the error-corrected low-frequency data are synchronized on the time axis and fused through non-linear combination. The expression is as follows:
[0106]
[0107] where u 3 (t) represents the high-precision grid-connected data, v 1 is the weight coefficient of the error-corrected low-frequency data, u 1 (t) represents the value of the denoised high-frequency data at time t, and v 2 represents the weight coefficient of the denoised high-frequency data.
[0108] It should be noted that the weight coefficients v 1 and v2 The contribution ratios of low-frequency and high-frequency data are adjusted respectively, enabling the fusion result to better reflect the dynamic characteristics of the actual power system. This method not only enhances the flexibility and adaptability of data processing, but also significantly improves the overall quality of grid-connected data, providing more solid data support for the real-time monitoring and optimized management of the power system.
[0109] This embodiment also provides a computer device applicable to the case of the method for improving the accuracy of grid-connected data, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the method for improving the accuracy of grid-connected data proposed in the above embodiment.
[0110] This computer device can be a terminal, which includes a processor, a memory, a communication interface, a display screen, and an input device connected through a system bus. Among them, the processor of this computer device is used to provide computing and control capabilities. The memory of this computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of this computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a carrier network, NFC (Near Field Communication), or other technologies. The display screen of this computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of this computer device can be a touch layer covering the display screen, or a button, a trackball, or a touchpad provided on the housing of the computer device, or an external keyboard, a touchpad, or a mouse, etc.
[0111] This embodiment also provides a storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the method for improving the accuracy of grid-connected data proposed in the above embodiment; the storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as a static random access memory (Static Random Access Memory, abbreviated as SRAM), an electrically erasable programmable read-only memory (Electrically Erasable Programmable Read-Only Memory, abbreviated as EEPROM), an erasable programmable read-only memory (Erasable Programmable Read Only Memory, abbreviated as EPROM), a programmable read-only memory (Programmable Red-Only Memory, abbreviated as PROM), a read-only memory (Read-Only Memory, abbreviated as ROM), a magnetic memory, a flash memory, a magnetic disk, or an optical disk.
[0112] In summary, the present invention achieves the following: by using time-varying wavelet transform to decompose the preprocessed grid-connected data into high-frequency and low-frequency data, the present invention realizes the fine stratification of non-stationary signals, ensures the retention of dynamic information, and provides a high-quality data basis for subsequent processing; then, by using the VMD technology to further decompose the high-frequency data and remove high-frequency noise, the effective signal components are accurately distinguished and retained, improving the data clarity. The combination of these two methods with preprocessing and final signal reconstruction not only enhances the overall quality of the grid-connected data but also ensures the generation of high-precision data, thus significantly improving the safety and stability of the power system operation and the efficiency of the smart grid.
[0113] Example 2, referring to Table 1, is the second example of the present invention. To further verify the technical solution of the present invention, experimental simulation data for the method of improving the accuracy of grid-connected data is given.
[0114] To verify the effectiveness of the method of the present invention in improving the accuracy of grid-connected data, a typical power system was selected as the experimental object, including multiple power generation stations, substations, and monitoring devices such as smart meters, which can capture the instantaneous state of the power system at high frequency (once per minute) and with high precision. The experimental time span was one month, during which more than 43,200 time-point data were collected, covering multiple parameters such as voltage fluctuation amplitude, frequency offset, load change rate, power factor, active power, reactive power, and current change rate.
[0115] First, a sliding window with a fixed length of 30 time points was set, and the fast Fourier transform (FFT) was performed on the preprocessed grid-connected data to extract local spectral features and monitor their changes in real time. According to these features, the Morlet wavelet was selected as the mother wavelet function, and a decomposition layer number of 5 was set to decompose the grid-connected data layer by layer into high-frequency and low-frequency data.
[0116] Second, the VMD algorithm was used to decompose the high-frequency data to generate modal components and residual components. The spectral density of each modal component was calculated through spectral analysis, and a frequency concentration threshold τ = 100 Hz was defined according to historical statistical data 2 , and the modal components containing high-frequency noise were removed, retaining the effective signals and residual components, thus realizing the accurate denoising of high-frequency data.
[0117] Finally, the low-frequency data was segmented into time windows of a fixed length using the sliding window method, and the LSTM model was used to capture the time correlation and potential periodic changes. Based on this, the intensity of the low-frequency data at future moments was predicted, and error correction was performed by combining the overall deviation and random fluctuation information in the statistical historical data to improve the prediction accuracy.
[0118] The existing technology specifically uses traditional moving average and smoothing methods for preliminary denoising, linear interpolation method to complement missing data, 3σ principle to detect and eliminate outliers, and simple moving window smoothing to reduce the impact of random noise. For the prediction of low-frequency components, it mainly relies on the linear extrapolation method based on historical data.
[0119] Specifically, it is shown in Table 1 below:
[0120] Table 1 Comparison Table of Grid-Connected Data Progress Improvement
[0121] Parameter Prior art Method of the present invention Improvement rate Voltage fluctuation amplitude ±1.23% ±0.37% 69.92% Frequency deviation ±0.048Hz ±0.012Hz 75.00% Load change rate ±3.47% ±0.98% 71.76% Power factor ±0.039 ±0.011 71.79% Active power ±1.96% ±0.49% 74.95% Reactive power ±2.48% ±0.62% 74.92% Current change rate ±3.95% ±0.99% 74.94%
[0122] Through the data analysis of the above table, it can be clearly seen that the method of the present invention shows significant advantages in optimizing the key parameters of the power system. For example, the present invention significantly reduces the voltage fluctuation amplitude (from ±1.23% to ±0.37%, with an improvement rate of 69.92%), frequency deviation (from ±0.048Hz to ±0.012Hz, with an improvement rate of 75.00%), and load change rate (from ±3.47% to ±0.98%, with an improvement rate of 71.76%). In addition, the improvement rates in aspects such as power factor, active power, reactive power, and current change rate all exceed 70%. These results indicate that the method of the present invention not only greatly improves the stability and efficiency of the power system, but also significantly reduces parameter fluctuations, providing a strong guarantee for the reliable operation of the power system.
[0123] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to the preferred embodiments, those of ordinary skill in the art should understand that the technical solutions of the present invention can be modified or equivalently replaced without departing from the spirit and scope of the technical solutions of the present invention, and they should all be covered within the scope of the claims of the present invention.
Claims
1. A method for improving grid-connected data accuracy, characterized in that: include, Collect grid-connected data and pre-process the grid-connected data; The pre-processed grid-connected data is decomposed into high-frequency data and low-frequency data using time-varying wavelet transform; The high-frequency data is decomposed into modal components and residual components through VMD, the modal components containing high-frequency noise are removed and the residual components are retained; Use LSTM to predict the future change range of low-frequency data, and perform error correction on low-frequency data based on the prediction results; The denoised high-frequency data and the error-corrected low-frequency data are fused through a signal reconstruction algorithm to generate high-precision grid-connected data.
2. The method for improving grid-connected data accuracy according to claim 1, characterized in that: The grid-connected data includes voltage fluctuation amplitude, frequency deviation, load change rate, power factor, active power, reactive power and current change rate.
3. The method for improving grid-connected data accuracy according to claim 2, characterized in that: The specific steps of preprocessing the grid-connected data are as follows: The sliding average method is used to perform preliminary denoising on the collected grid-connected data; Interpolation method is used to complete the missing data in the collection process; Use statistical methods to detect and remove outliers in the data; The grid-connected data is smoothed by sliding window.
4. The method for improving grid-connected data accuracy according to claim 3, characterized in that: The method of using time-varying wavelet transform to decompose the pre-processed grid-connected data into high-frequency data and low-frequency data is specifically performed as follows: A sliding window of fixed length is set for the preprocessed grid-connected data, Fourier transform is performed on the grid-connected data in each window, local spectrum features of the grid-connected data are extracted, and actual changes of the local spectrum features are monitored in real time; Extract the time-varying characteristics of the grid-connected data based on the actual changes in local spectrum characteristics; According to the local spectrum characteristics and time-varying characteristics of the grid-connected data, the mother wavelet function and the number of decomposition levels are selected; Based on the mother wavelet function and the number of decomposition layers, the grid-connected data is decomposed into high-frequency data and low-frequency data layer by layer using time-varying wavelet transform.
5. The method for improving grid-connected data accuracy according to claim 4, characterized in that: The high-frequency data is decomposed into modal components and residual components by VMD, the modal components containing high-frequency noise are removed and the residual components are retained. The specific steps are as follows: Perform frequency domain analysis on high-frequency data through Fourier transform to extract the frequency characteristics of high-frequency data; Based on the frequency characteristics of high-frequency data, VMD gradually decomposes the high-frequency data, extracts the modal components in different frequency ranges, adjusts the center frequency of each modal component, and uses the undecomposed part as the residual component; Perform spectrum analysis on the modal components, calculate the spectrum density, and predict the frequency concentration of the modal components based on the spectrum density. The expression is: Among them, C k represents the frequency concentration of the kth modal component, f represents the frequency of the grid-connected data, and f max Indicates the maximum frequency of grid-connected data, f min Indicates the minimum frequency of grid-connected data, S k (f) represents the power spectral density of the kth modal component, where k represents the index variable of the modal component; The frequency concentration threshold τ is defined based on the statistical characteristics of the frequency concentration of the modal components in the historical grid-connected data; When C k >τ, the current modal component is considered to be high-frequency noise; When C k When ≤τ, the current modal component is considered to be a non-noise component; The non-noise component and the residual component will be retained to generate the denoised high-frequency data u1.
6. The method for improving grid-connected data accuracy according to claim 5, characterized in that: The power spectral density of the modal component is obtained by performing Fourier transform on the modal component, and the expression is: Among them, x k (t) represents the time domain signal of the kth modal component, j is an imaginary unit, and t represents the current time.
7. The method for improving grid-connected data accuracy according to claim 6, characterized in that: The method uses LSTM to predict the future change range of low-frequency data and performs error correction on the low-frequency data according to the prediction results. The specific steps are as follows: The sliding window method is used to divide the low-frequency data into time windows of fixed length; Based on a fixed-length time window, LSTM is used to capture the time correlation and potential periodic changes of low-frequency data, and combined with the hidden state, nonlinear activation function and sine function of LSTM, the low-frequency data intensity at future moments is predicted. The expression is: Among them, T(t+Δt) is the change amplitude of the low-frequency data at the future time t+Δt, u(t o ) is the low-frequency data at historical time t o The value of W i is the time step weight coefficient, n is the time window length, Δt is the time step length, γ is the periodic trend adjustment coefficient, β is the periodic frequency adjustment coefficient, and h t is the hidden layer output value of LSTM at the current time t, u represents the value of low-frequency data in the time series at time t, and i is the index variable of the time step; Based on the change range of low-frequency data at the future time t+Δt, the overall deviation and random fluctuation information in the statistical historical data are used to correct the low-frequency data. The expression is: Where u2(t) represents the low-frequency data value at time t after error correction, u(t o ) represents the historical moment t o The low-frequency data value, T(t o ) represents the historical moment t o The rate of change of low-frequency data, α represents the mean error correction coefficient, β represents the root mean square error correction coefficient, t o Indicates the time point of the oth historical moment in the time window.
8. The method for improving grid-connected data accuracy according to claim 7, characterized in that: The high-frequency data after denoising and the low-frequency data after error correction are fused through a signal reconstruction algorithm to generate high-precision grid-connected data. The specific steps are as follows: Using the interpolation method, the denoised high-frequency data and the error-corrected low-frequency data are synchronously processed on the time axis and fused through nonlinear combination. The expression is: Among them, u3(t) represents high-precision grid-connected data, v1 is the weight coefficient of low-frequency data after error correction, u1(t) represents the value of high-frequency data after denoising at time t, and v2 represents the weight coefficient of high-frequency data after denoising.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method for improving the accuracy of grid-connected data according to any one of claims 1 to 8 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for improving grid-connected data accuracy described in any one of claims 1 to 8 are implemented.